fix map __call__

This commit is contained in:
2023-06-16 10:35:06 +01:00
parent 3071da2e2d
commit 651830ec31

View File

@@ -78,9 +78,19 @@ func runCall(c call, stack stack, stacklevel int) (any, ArErr) {
} }
switch x := callable_.(type) { switch x := callable_.(type) {
case ArObject: case ArObject:
callable_ = x.obj["__call__"] callable_, err := mapGet(ArMapGet{
x,
[]any{"__call__"},
c.line,
c.code,
c.path,
}, stack, stacklevel)
if !err.EXISTS {
callable = callable_
}
default:
callable = callable_
} }
callable = callable_
} }
args := []any{} args := []any{}
level := append(stack, newscope()) level := append(stack, newscope())