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
+2 -2
View File
@@ -19,7 +19,7 @@ native_pair func(value native.Pair) native.Pair {
global_pair native.Pair :: native.Pair { left = 1, right = 2 }
main func() i32 {
pair native.Pair = native_pair(global_pair)
pair native.Pair := native_pair(global_pair)
pair.left = 10
pair = native.echo_pair(pair)
pairs [1]native.Pair :: [pair]
@@ -33,7 +33,7 @@ main func() i32 {
tail = 13,
})
arrays native.Arrays :: native.echo_arrays(native.Arrays { values = [14, 15, 16] })
choice native.Choice = native.Choice { decimal = 1.0 }
choice native.Choice := native.Choice { decimal = 1.0 }
choice.integer = 17
choice = native.echo_choice(choice)
forward native.Forward :: native.echo_forward(native.Forward { value = 19 })
+1 -1
View File
@@ -5,7 +5,7 @@ native :: import "../include/native.h"
# self-referential `?*mut Node` field as C-layout-compatible.
main func() i32 {
node native.Node = native.Node { next = null, value = 7 }
node native.Node := native.Node { next = null, value = 7 }
if node.next |_| {
return 1
}