at operator return -1 when fails in lists and arrays; insert operators (<< and >>) changes che container if it is a variable

This commit is contained in:
2026-07-16 07:25:15 +02:00
parent 8c55f4ac4b
commit 2f616f349b
11 changed files with 105 additions and 60 deletions
+2
View File
@@ -42,6 +42,8 @@ func TestOperator(t *testing.T) {
/* 26 */ {`a="1"; --a`, nil, `[1:9] prefix/postfix operator "--" does not support operand '1' [string]`},
/* 27 */ {`a="1"; a++`, nil, `[1:10] prefix/postfix operator "++" does not support operand '1' [string]`},
/* 28 */ {`a="1"; a--`, nil, `[1:10] prefix/postfix operator "--" does not support operand '1' [string]`},
/* 29 */ {`2 << 3;`, int64(16), nil},
/* 30 */ {`2 >> 3;`, int64(0), nil},
}
// t.Setenv("EXPR_PATH", ".")