The assign operator '=' can now set items in ListType and DictType

This commit is contained in:
2024-06-04 11:07:35 +02:00
parent f2d6d63017
commit d96123ab02
2 changed files with 129 additions and 2 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ func TestListParser(t *testing.T) {
/* 30 */ {`2 >> 3;`, nil, errors.New(`[1:4] left operand '2' [integer] and right operand '3' [integer] are not compatible with operator ">>"`)},
/* 31 */ {`a=[1,2]; a<<3`, []any{1, 2, 3}, nil},
/* 33 */ {`a=[1,2]; 5>>a`, []any{5, 1, 2}, nil},
/* 34 */ {`L=[1,2]; L[0]=9; L`, newListA(int64(9),int64(2)), nil},
// /* 8 */ {`[int(x)|x=csv("test.csv",1,all(),1)]`, []any{int64(10), int64(40), int64(20)}, nil},
// /* 9 */ {`sum(@[int(x)|x=csv("test.csv",1,all(),1)])`, []any{int64(10), int64(40), int64(20)}, nil},
}