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

strange error for local with same name as argument #19614

Closed
JeffBezanson opened this issue Dec 15, 2016 · 2 comments
Closed

strange error for local with same name as argument #19614

JeffBezanson opened this issue Dec 15, 2016 · 2 comments
Labels
bug Indicates an unexpected problem or unintended behavior compiler:lowering Syntax lowering (compiler front end, 2nd stage) regression Regression in behavior compared to a previous version

Comments

@JeffBezanson
Copy link
Member

JeffBezanson commented Dec 15, 2016

julia> function f(x)
        local x
        x = 1
       end
f (generic function with 1 method)

julia> f(1)
ERROR: UndefVarError: x not defined
 in f(::Int64) at ./REPL[1]:2

In versions <=0.4, this gave ERROR: syntax: local "x" conflicts with argument when parsing the method definition.

@JeffBezanson JeffBezanson added bug Indicates an unexpected problem or unintended behavior compiler:lowering Syntax lowering (compiler front end, 2nd stage) regression Regression in behavior compared to a previous version labels Dec 15, 2016
@tkelman
Copy link
Contributor

tkelman commented Dec 15, 2016

guessing, but possibly related to #17445?

@JeffBezanson
Copy link
Member Author

Duplicate of #15229, fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior compiler:lowering Syntax lowering (compiler front end, 2nd stage) regression Regression in behavior compared to a previous version
Projects
None yet
Development

No branches or pull requests

2 participants