Keno / ASTInterpreter.jl

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

``@enter`` on type leads to MethodError #40

Closed joehuchette closed 8 years ago

joehuchette commented 8 years ago
julia> type Foo
       x
       end

julia> @enter Foo("bar")
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:71
 in #enter#5(::Void, ::ASCIIString, ::Any, ::LambdaInfo, ::Expr, ::ASTInterpreter.Environment, ::Array{Any,1}) at /Users/huchette/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:95
 [inlined code] from ./int.jl:32
 in #enter#6(::Array{Any,1}, ::Any, ::Method, ::ASTInterpreter.Environment, ::Array{Any,1}) at /Users/huchette/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:112
 [inlined code] from ./boot.jl:303
 in enter_call_expr(::Void, ::Expr) at /Users/huchette/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:937
 in eval(::Module, ::Any) at ./boot.jl:237
Keno commented 8 years ago

I can't reproduce this. Can you make sure you have up to date ASTInterpreter, AbstractTrees and julia?

joehuchette commented 8 years ago

Hmm just updated to latest julia master and this went away, sorry for the noise.