mirror of
https://github.com/Open-Argon/argon-v3.git
synced 2025-12-06 00:46:07 +00:00
fix map __call__
This commit is contained in:
14
src/call.go
14
src/call.go
@@ -78,10 +78,20 @@ 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_
|
callable = callable_
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
callable = callable_
|
||||||
|
}
|
||||||
|
}
|
||||||
args := []any{}
|
args := []any{}
|
||||||
level := append(stack, newscope())
|
level := append(stack, newscope())
|
||||||
for _, arg := range c.args {
|
for _, arg := range c.args {
|
||||||
|
|||||||
Reference in New Issue
Block a user