mutable decl syntax change

This commit is contained in:
2026-08-05 21:19:41 +02:00
parent 88b94197c9
commit 081a3fd5df
74 changed files with 870 additions and 733 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
hide helper func() i32 {
thing Thing = Thing { value = value }
thing Thing := Thing { value = value }
return thing.value
}
@@ -20,7 +20,7 @@ hide Local_Distinct :: distinct i32
hide Local_Alias :: alias i32
hide value :: 1
hide mutable_value i32 = 1
hide mutable_value i32 := 1
_foreign c_func() i32 {
return 1
@@ -39,6 +39,6 @@ hide Local_C_Record :: c_struct {
}
from_a func() i32 {
record Local_C_Record = Local_C_Record { value = 0 }
record Local_C_Record := Local_C_Record { value = 0 }
return helper() + local_foreign() + i32(record.value)
}
+3 -3
View File
@@ -6,8 +6,8 @@ Box :: struct {
}
from_b func(_input i32) i32 {
_local Box = Box { _value = _input }
record _C_Record = _C_Record { value = 0 }
thing Thing = Thing { value = value }
_local Box := Box { _value = _input }
record _C_Record := _C_Record { value = 0 }
thing Thing := Thing { value = value }
return helper() + thing.value + _local._value + _foreign() + i32(record.value) + dep._visible()
}
@@ -1 +1 @@
bad = 1
bad := undefined