migrate to new mutable decl syntax

This commit is contained in:
2026-08-05 21:53:09 +02:00
parent 1689c4db3c
commit 410246faee
20 changed files with 116 additions and 112 deletions
+3 -3
View File
@@ -46,9 +46,9 @@ TypeInfo :: union(enum) {
EnumFieldStruct proc($E, $Field type, $default ?Field) type {
match typeinfo!(E) {
.enum |info|: {
names [info.fields.len]mut []u8 = undefined
field_types [info.fields.len]mut type = undefined
defaults [info.fields.len]mut ?Field = undefined
names [info.fields.len]mut []u8 := undefined
field_types [info.fields.len]mut type := undefined
defaults [info.fields.len]mut ?Field := undefined
inline for info.fields |field, index| {
names[index] = field.name
field_types[index] = Field
+2 -2
View File
@@ -42,7 +42,7 @@ distinct_reflection_exposes_immediate_backing test {
enum_field_struct_defaults test {
names TestNames = {
names TestNames := {
ident = "identifier",
int = "integer",
}
@@ -60,7 +60,7 @@ enum_field_struct_defaults test {
try testing.expect(false)
}
empty TestNames = {}
empty TestNames := {}
if field!(empty, "ident") |_| {
try testing.expect(false)
}