preserve active comptime state in local type declarations

This commit is contained in:
2026-07-21 22:48:16 +02:00
parent dd00af7731
commit 1619ea98a3
3 changed files with 8 additions and 9 deletions
+3 -4
View File
@@ -943,10 +943,9 @@
identically during comptime evaluation; zeroing is `memset!(destination, 0)`
- `std/mem` aligned reallocation uses `memcopy!`
46. fix `EnumFieldStruct` in `std/meta`
- currently, the `|info|` `.enum` payload capture doesn't preserve the comptime-ness in the match statement
this results in having to type other values in the scope like `[field!(typeinfo!(E), "enum").fields.len]mut []u8`
which is obviously absurd
46. fix `EnumFieldStruct` in `std/meta` (implemented)
- comptime local declarations resolve type syntax in the active interpreter state, preserving match captures
- `EnumFieldStruct` sizes its working arrays directly from the comptime `.enum |info|` capture
## A word on unchecked casts