Skip to content

Commit

Permalink
disallow 'global x' when x exists in outer scope
Browse files Browse the repository at this point in the history
"fixes" #7264

[av skip]
  • Loading branch information
ihnorton committed Jul 2, 2015
1 parent 91ebd61 commit d81fea5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -3229,7 +3229,11 @@ So far only the second case can actually occur.
(mark-label endl))
))

((global) #f) ; remove global declarations
((global) ; remove global declarations
(let ((vname (cadr e)))
(if (var-info-for vname vi)
(error (string "variable \"" vname "\" declared local in enclosing scope"))
#f)))
((implicit-global) #f)
((local!) #f)
((jlgensym) #f)
Expand Down

0 comments on commit d81fea5

Please sign in to comment.