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

Function names cannot be reserved words #15991

Merged
merged 1 commit into from
Apr 22, 2016

Conversation

stevenhao
Copy link
Contributor

this does not affect macros (to accommodate @catch in #15409)

fixes #15661

stagedfunction function macro quote let local global const
abstract typealias type bitstype immutable ccall do
module baremodule using import export importall))

(define initial-reserved-word? (Set initial-reserved-words))

(define reserved-words '(begin end while if else for try catch finally return break continue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to repeat this list here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, fixed.

@Keno
Copy link
Member

Keno commented Apr 21, 2016

Would be good to add a test.

macros are unchanged, for now (to accomodate @catch)
@stevenhao
Copy link
Contributor Author

added tests.

@JeffBezanson JeffBezanson merged commit d721a79 into JuliaLang:master Apr 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reserved words as function names doesn't raise error
3 participants