rename expand to inline

This commit is contained in:
2026-08-02 20:31:05 +02:00
parent c92723bc14
commit 9e79d6692b
13 changed files with 123 additions and 82 deletions
+3 -3
View File
@@ -11,7 +11,7 @@ format func() []u8 {
sum func($T type, value T) i32 {
total i32 = 0
match typeinfo!(T) {
.record |record|: expand for record.fields |field| {
.record |record|: inline for record.fields |field| {
total += i32(field!(value, field.name))
}
else: compile_error!("sum requires a record")
@@ -22,7 +22,7 @@ sum func($T type, value T) i32 {
static_control func($T type, value T) i32 {
total i32 = 0
match typeinfo!(T) {
.record |record|: expand for record.fields |field| {
.record |record|: inline for record.fields |field| {
{
if field.index == 1 {
continue
@@ -50,7 +50,7 @@ row_value func(row Row) i32 {
static_aggregates func() i32 {
total i32 = 0
expand for {Row {value = 2}, Row {value = 40}} |row| {
inline for {Row {value = 2}, Row {value = 40}} |row| {
total += row_value(row)
}
return total