We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
On 0.5/master, there seem to be conflicting assumptions somewhere regarding scope when different methods of inner functions have different scopes.
function outer() inner(x) = x let y = 1 inner() = y inner end end julia> outer() ERROR: UndefVarError: y not defined in outer() at ./REPL[1]:2
This doesn't seem to make much sense, since inner isn't even called. In fact, I get the error even if I wrap the let block in if false ... end.
inner
let
if false ... end
On 0.4:
julia> outer() inner (generic function with 2 methods)
and inner works as expected.
For fun, this works:
function outer() inner(x) = x let y = 1 (::typeof(inner))() = y inner end end
but it prints a warning about a rewritten method definition every time outer is called.
outer
It may be that this code pattern is actually impossible to handle since #13412, but if that's the case, we could be more explicit about that.
The text was updated successfully, but these errors were encountered:
Dup of #15602
Sorry, something went wrong.
No branches or pull requests
On 0.5/master, there seem to be conflicting assumptions somewhere regarding scope when different methods of inner functions have different scopes.
This doesn't seem to make much sense, since
inner
isn't even called. In fact, I get the error even if I wrap thelet
block inif false ... end
.On 0.4:
and
inner
works as expected.For fun, this works:
but it prints a warning about a rewritten method definition every time
outer
is called.It may be that this code pattern is actually impossible to handle since #13412, but if that's the case, we could be more explicit about that.
The text was updated successfully, but these errors were encountered: