convert function call to builtInCall in setvariable, and add OOP example

This commit is contained in:
2023-06-21 20:36:06 +01:00
parent ae08f059fb
commit 9fe8bcb515
8 changed files with 59 additions and 56 deletions

View File

@@ -275,13 +275,7 @@ func setVariableValue(v setVariable, stack stack, stacklevel int) (any, ArErr) {
case ArObject:
if _, ok := y.obj["__setindex__"]; ok {
callable := y.obj["__setindex__"]
_, err := runCall(call{
callable: callable,
args: []any{key, resp},
line: v.line,
path: v.path,
code: v.code,
}, stack, stacklevel+1)
builtinCall(callable, []any{key, resp})
if err.EXISTS {
return nil, err
}