remove undefined global constraint

This commit is contained in:
2026-07-22 02:43:30 +02:00
parent 63f000dd42
commit 0d04925b3a
4 changed files with 29 additions and 21 deletions
+2 -1
View File
@@ -177,7 +177,7 @@
- future direction: generalize toward Zig-style arbitrary pointer-result casts once casts have a broader result-type story
12. `undefined` as inspired by zig (implemented):
- allow mutable local declarations with `undefined`
- allow mutable local and global declarations with `undefined`
- undefined values are assigned a poison value (0xaa...)
- allows for something like:
```
@@ -696,6 +696,7 @@
and inferred array counts may resolve through the existing inference fixpoint, but
the final type must be concrete runtime storage
- emit source-defined mutable globals as writable globals, not constants
- allow `undefined` initializers for runtime storage initialized explicitly by a function
- allow assignment, address-taking, field/index mutation, and pointer passing under
the same mutability rules as other writable locations
- keep mutable globals invalid in comptime evaluation; `$global_var` and writes from