Skip to content

Commit

Permalink
fix #37126, spurious soft scope warning on hidden name (#37178)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Aug 25, 2020
1 parent dbf5e00 commit 9ae0a73
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -2051,6 +2051,7 @@
(n (length lhss))
(st (gensy)))
`(block
(local ,st)
,@ini
,.(map (lambda (i lhs)
(expand-forms
Expand Down
12 changes: 12 additions & 0 deletions test/syntax.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2091,6 +2091,18 @@ end
end
@test z28789 == 42

# issue #37126
@test isempty(Test.collect_test_logs() do
include_string(@__MODULE__, """
function foo37126()
f(lhs::Integer, rhs::Integer) = nothing
f(lhs::Integer, rhs::AbstractVector{<:Integer}) = nothing
return f
end
struct Bar37126{T<:Real, P<:Real} end
""")
end[1])

# issue #34673
# check that :toplevel still returns a value when nested inside something else
@test eval(Expr(:block, 0, Expr(:toplevel, 43))) == 43
Expand Down

0 comments on commit 9ae0a73

Please sign in to comment.