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

line numbers and macros #2792

Closed
mlubin opened this issue Apr 8, 2013 · 2 comments
Closed

line numbers and macros #2792

mlubin opened this issue Apr 8, 2013 · 2 comments

Comments

@mlubin
Copy link
Member

mlubin commented Apr 8, 2013

In m.jl:

# dummy macro
macro m(x)
    quote
        $(esc(x))
    end
end

In dummy.jl:

include("m.jl")
@m y

Then:

$ julia dummy.jl 
ERROR: y not defined
 in include_from_node1 at loading.jl:92
 in process_options at client.jl:250
 in _start at client.jl:329
at /home/mlubin/dummy.jl:4

The line number reported comes from the macro, and it reports the incorrect file name. What's the best way to make this work? It should at least mention dummy.jl:2, and then maybe m.jl:4.

jump-dev/JuMP.jl#7

@JeffBezanson
Copy link
Sponsor Member

I believe a dup of #1334.

@mlubin
Copy link
Member Author

mlubin commented Apr 8, 2013

Looks like it.

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