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

@@ -20,6 +20,7 @@
- Error if a stack allocated variable is too big (configurable with `--max-stack-object-size`).
- Add `@safeinfer` to allow `var` to be used locally.
- Types converts to typeid implicitly.
- Allow `$defined` take declarations: `$defined(int x = y)`
### Fixes
- List.remove_at would incorrectly trigger ASAN.
@@ -58,6 +59,7 @@
- Incorrect type checking when &[] and [] return optional values.
- Failed to find subscript overloading on optional values.
- `Socket.get_option` didn't properly call `getsockopt`, and `getsockopt` had an invalid signature.
- Taking the address of a label would cause a crash. #2430
### Stdlib changes
- Add `==` to `Pair`, `Triple` and TzDateTime. Add print to `Pair` and `Triple`.