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

fix #33135, wrong scope resolution with conflicting sparams and let vars #33145

Merged
merged 1 commit into from
Sep 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -2554,7 +2554,7 @@
(append locals-nondef locals-def)
;; global declarations at the top level are not inherited
(if toplevel? '() globals)
(scope:sp scope)
'()
(append (map cons need-rename renamed)
(map cons need-rename-def renamed-def))
scope)))
Expand Down
7 changes: 7 additions & 0 deletions test/syntax.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1928,3 +1928,10 @@ end
# Stream positioning after parsing var
@test Meta.parse("var'", 1, greedy=false) == (:var, 4)

# issue #33135
function f33135(x::T) where {C1, T}
let C1 = 1, C2 = 2
C1
end
end
@test f33135(0) == 1