Closed
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.