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

Error in return statement not showing up in backtrace #2359

Closed
maleadt opened this issue Feb 19, 2013 · 1 comment
Closed

Error in return statement not showing up in backtrace #2359

maleadt opened this issue Feb 19, 2013 · 1 comment

Comments

@maleadt
Copy link
Member

maleadt commented Feb 19, 2013

Upon executing the following simple program:

function foo()
        return bar
end

function main(args)
        foo()
end

main(ARGS)

... the backtrace does not contain a reference to the place where the error occurs:

$ julia test/bug/backtrace.jl 
ERROR: in main: bar not defined
 in main at test/bug/backtrace.jl:6
at test/bug/backtrace.jl:9

Changing foo() to trigger the error before the return statement, e.g. by first doing 'bar += 1', the backtrace DOES correctly mention where the issue happened.

@JeffBezanson
Copy link
Sponsor Member

Due to inlining. Dup of #1189.

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