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]] parse const declarations in ForIn/Of loops #2335

Closed
wants to merge 1 commit into from

Conversation

caitp
Copy link
Member

@caitp caitp commented Apr 23, 2015

Closes #2334

@@ -4189,8 +4189,8 @@ var JSHINT = (function() {
if (state.tokens.next.id === "var") {
advance("var");
state.tokens.curr.fud({ prefix: true });
} else if (state.tokens.next.id === "let") {
advance("let");
} else if (state.tokens.next.id === "let" || state.tokens.next.id === "const") {
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: should only be treating let/const specially if esnext es3 or es5 mode is used

@caitp
Copy link
Member Author

caitp commented Apr 23, 2015

self-reviewed, think it should wait on fixing the behaviour of const though.

@rwaldron
Copy link
Member

I'm mobile atm so can't compare with #2326 is there any overlap? (Sorry if that seems lazy)

@caitp
Copy link
Member Author

caitp commented Apr 23, 2015

not that I can see in the diff

@caitp
Copy link
Member Author

caitp commented Apr 23, 2015

it looks like coveralls.io is having issues

@lukeapage
Copy link
Member

I don't think it conflicts with my pr :)

@caitp
Copy link
Member Author

caitp commented Apr 24, 2015

it's not conflicts that's the worry, it's that the behaviour of const is pretty broken atm =)

@lukeapage
Copy link
Member

lukeapage commented Apr 24, 2015 via email

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 96.36% when pulling c7b3121 on caitp:issue-2334 into dd768c2 on jshint:master.

@caitp caitp closed this in 2b673d9 Apr 24, 2015
jugglinmike pushed a commit to jugglinmike/jshint that referenced this pull request May 9, 2015
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.

Fails to properly parse for..of loops with const bindings
4 participants