Keno / ASTInterpreter.jl

Gallium's AST interpreter as a separate package to simplify development
Other
16 stars 10 forks source link

Assertion error when using end in getindex #43

Closed joehuchette closed 8 years ago

joehuchette commented 8 years ago
julia> a = rand(3);

julia> @enter a[end]
ERROR: AssertionError: isa(arg,Expr) && arg.head == :call
 in eval(::Module, ::Any) at ./boot.jl:236
joehuchette commented 8 years ago

Also:

julia> @enter getindex(a, 1)
ERROR: MethodError: no method matching length(::LineNumberNode)
 in make_annotations(::ASTInterpreter.##1#3, ::LineNumberNode, ::Expr, ::Bool) at /Users/huchette/.julia/v0.5/AbstractTrees/src/AbstractTrees.jl:194 (repeats 2 times)
 in make_shadowtree(::Expr) at /Users/huchette/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:72
 in #enter#5(::Void, ::UTF8String, ::Any, ::LambdaInfo, ::Expr, ::ASTInterpreter.Environment, ::Array{Any,1}) at /Users/huchette/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:96
 [inlined code] from ./promotion.jl:229
 in #enter#6(::Array{Any,1}, ::Any, ::Method, ::ASTInterpreter.Environment, ::Array{Any,1}) at /Users/huchette/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:114
 in enter_call_expr(::Void, ::Expr) at /Users/huchette/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:956
 in eval(::Module, ::Any) at ./boot.jl:236

I just pulled julia master and Gallium master (and dependencies) a few minutes ago, so hopefully this is fresh.

Keno commented 8 years ago

I couldn't reproduce the second issue. Perhaps you need to update AbstractTrees?

joehuchette commented 8 years ago

Yep, missed that one. Thanks!