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

Reserved words as function names doesn't raise error #15661

Closed
yuyichao opened this issue Mar 28, 2016 · 3 comments · Fixed by #15991
Closed

Reserved words as function names doesn't raise error #15661

yuyichao opened this issue Mar 28, 2016 · 3 comments · Fixed by #15991
Labels
parser Language parsing and surface syntax

Comments

@yuyichao
Copy link
Contributor

julia> function catch() end
catch (generic function with 1 method)

julia> function end() end
end (generic function with 1 method)

julia> function finally() end
finally (generic function with 1 method)

Not that there's much harm you can do with these either though....

@yuyichao yuyichao added the parser Language parsing and surface syntax label Mar 28, 2016
@samoconnor
Copy link
Contributor

I wanted a function called catch, but when defined this way, it does produce an error...

julia> catch(f) = (args...) -> try f(args...) catch ex; ex end
ERROR: syntax: unexpected "catch"

@yuyichao
Copy link
Contributor Author

The error is expected. This issue is about certain forms doesn't raise the error.

@samoconnor
Copy link
Contributor

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser Language parsing and surface syntax
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants