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 error on functions ending with @goto. #7312

Merged
merged 2 commits into from Jun 19, 2014
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/julia-syntax.scm
Expand Up @@ -2499,7 +2499,11 @@
(cons (car ex)
(append fu (cdr ex))))
(map-to-lff e dest tail)))


((symbolicgoto symboliclabel)
(cons (if tail '(return (null)) '(null))
(map-to-lff e #f #f)))

(else
(map-to-lff e dest tail)))))

Expand Down
19 changes: 19 additions & 0 deletions test/goto.jl
Expand Up @@ -69,3 +69,22 @@ end
end
end)


function goto_test6()
@goto a
@label a
end

@test goto_test6() == nothing


function goto_test7(x)
@label a
if x
@goto a
end
end

@test goto_test7(false) == nothing