Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"UndefVarError: call not defined" when doing call = Expr(x...) #11295

Closed
nalimilan opened this issue May 16, 2015 · 1 comment
Closed

"UndefVarError: call not defined" when doing call = Expr(x...) #11295

nalimilan opened this issue May 16, 2015 · 1 comment

Comments

@nalimilan
Copy link
Member

I bumped into this weird bug when trying to make DataFramesMeta.jl pass its tests on 0.4 (FWIW, that happens in the thread_left() function.)
I've simplified the test case to this:

julia> function f(x...)
           call = Expr(x...)
       end
f (generic function with 1 method)

julia> f(:a, :b)
ERROR: UndefVarError: call not defined
 in f at none:2

The problem disappears if:

  • call is renamed to something else
  • another function than Expr is called
  • varargs are replaced with a fixed number of arguments

CC: @tshort

@vtjnash
Copy link
Member

vtjnash commented May 16, 2015

looks like this is potentially an issue with lowering. #10403 would likely fix this.

julia> code_lowered(f,(Symbol,Symbol))
1-element Array{Any,1}:
 :($(Expr(:lambda, Any[:(x::Any...)], Any[Any[:call],Any[Any[:x,:Any,0],Any[:call,:Any,18]],Any[],1], :(begin  # none, line 2:
        GenSym(0) = (top(_apply))(call,Expr,x)
        call = GenSym(0)
        return GenSym(0)
    end))))

davidagold pushed a commit to davidagold/DataFramesMeta.jl that referenced this issue May 28, 2015
Using 'call' as a variable name currently triggers a bug in
Julia 0.4: JuliaLang/julia#11295
Work around it for now by using a different name.

Also get rid of deprecation warnings printed during the tests,
using Compat.jl where necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants