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

Disallow multiple assignment for constants. Fixes #3466 #3728

Merged
merged 1 commit into from Dec 20, 2016
Merged

Disallow multiple assignment for constants. Fixes #3466 #3728

merged 1 commit into from Dec 20, 2016

Conversation

sdogruyol
Copy link
Member

This is a reopen of #3507. #3507 got messed up and couldn't find a way to fix unknown repository error on Github.

@@ -1324,6 +1323,8 @@ describe "Parser" do
"can't change the value of self"
assert_syntax_error "self += 1",
"can't change the value of self"
assert_syntax_error "FOO, BAR = 1, 2",
Copy link
Member Author

Choose a reason for hiding this comment

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

@asterite IDK why but this fails with

  1) Parser says syntax error on "FOO, BAR = 1, 2"
     Failure/Error: assert_syntax_error "FOO, BAR = 1, 2",

       expected message to include "Multiple assignment is not allowed for constants" but got "unexpected token: ,"

Copy link
Member Author

Choose a reason for hiding this comment

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

I've fixed it 🎉

@sdogruyol
Copy link
Member Author

@asterite i've updated the PR

@asterite
Copy link
Member

@sdogruyol Thank you! 🎉

@asterite asterite merged commit df2890a into crystal-lang:master Dec 20, 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.

None yet

2 participants