Allow $defined take declarations: $defined(int x = y)

Taking the address of a label would cause a crash. #2430
This commit is contained in:
Christoffer Lerno
2025-08-23 12:00:17 +02:00
parent f36e9fea48
commit e4e499edd2
16 changed files with 109 additions and 56 deletions

View File

@@ -188,8 +188,9 @@ fn LinkedEntry*? LinkedHashMap.get_entry(&map, Key key)
}
<*
Get the value or update and
@require @assignable_to(#expr, Value)
Get the value or set it to the value
@require $defined(Value val = #expr)
*>
macro Value LinkedHashMap.@get_or_set(&map, Key key, Value #expr)
{