mutable decl syntax change
This commit is contained in:
@@ -9,7 +9,7 @@ format func() []u8 {
|
||||
}
|
||||
|
||||
sum func($T type, value T) i32 {
|
||||
total i32 = 0
|
||||
total i32 := 0
|
||||
match typeinfo!(T) {
|
||||
.record |record|: inline for record.fields |field| {
|
||||
total += i32(field!(value, field.name))
|
||||
@@ -20,7 +20,7 @@ sum func($T type, value T) i32 {
|
||||
}
|
||||
|
||||
static_control func($T type, value T) i32 {
|
||||
total i32 = 0
|
||||
total i32 := 0
|
||||
match typeinfo!(T) {
|
||||
.record |record|: inline for record.fields |field| {
|
||||
{
|
||||
@@ -49,7 +49,7 @@ row_value func(row Row) i32 {
|
||||
}
|
||||
|
||||
static_aggregates func() i32 {
|
||||
total i32 = 0
|
||||
total i32 := 0
|
||||
inline for {Row {value = 2}, Row {value = 40}} |row| {
|
||||
total += row_value(row)
|
||||
}
|
||||
@@ -57,7 +57,7 @@ static_aggregates func() i32 {
|
||||
}
|
||||
|
||||
main func() i32 {
|
||||
numbers Numbers = Numbers {1, 2, 39}
|
||||
numbers Numbers := Numbers {1, 2, 39}
|
||||
singleton :: {42,}
|
||||
empty :: {}
|
||||
block_value :: {
|
||||
|
||||
Reference in New Issue
Block a user