Skip to content

Commit cdefdcb

Browse files
allow getindex in lookup_or_eval :call (#651)
this is needed for cxxwrap Co-authored-by: Kristoffer Carlsson <[email protected]>
1 parent d88ba3a commit cdefdcb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/interpret.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ function lookup_or_eval(@nospecialize(recurse), frame::Frame, @nospecialize(node
112112
return typeassert(ex.args[2], ex.args[3])
113113
elseif f === Base.getproperty && length(ex.args) == 3
114114
return invokelatest(Base.getproperty, ex.args[2], ex.args[3])
115+
elseif f === Base.getindex && length(ex.args) >= 3
116+
popfirst!(ex.args)
117+
return Base.getindex(ex.args...)
115118
elseif f === Core.Compiler.Val && length(ex.args) == 2
116119
return Core.Compiler.Val(ex.args[2])
117120
elseif f === Val && length(ex.args) == 2

0 commit comments

Comments
 (0)