migrate to new mutable decl syntax
This commit is contained in:
+3
-3
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user