-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
compiler:loweringSyntax lowering (compiler front end, 2nd stage)Syntax lowering (compiler front end, 2nd stage)
Description
julia> function fs()
f(lhs::Integer) = 1
f(lhs::Integer, rhs::(local x=Integer; x)) = 2
return f
end
fs (generic function with 1 method)
julia> x
Integer
This is supposed to end up as a local of the toplevel thunk, but it becomes a global instead. It's fine if there's only one method definition of the closure:
julia> function fs()
f(lhs::Integer, rhs::(local x=Integer; x)) = 2
return f
end
fs (generic function with 1 method)
julia> x
ERROR: UndefVarError: `x` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Metadata
Metadata
Assignees
Labels
compiler:loweringSyntax lowering (compiler front end, 2nd stage)Syntax lowering (compiler front end, 2nd stage)