Skip to content

Conversation

@GeoffreyBooth
Copy link
Collaborator

Copied from #3766 by @lumeet (I cleaned up the code slightly):

This addresses at least #3309 and #3738 and has to do with parenthesized existential operator. After turning it back and forth several times, I couldn’t find anything more elegant than this. I’m not sure if it requires something more fundamental to make the check with some more beauty. Additionally, in what case it could possibly generate extra parentheses now?

This looks good to me. It’s been waiting long enough. Pull the trigger? Merge it into 2?

Copy link
Collaborator

@lydell lydell left a comment

Choose a reason for hiding this comment

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

LGTM

@GeoffreyBooth GeoffreyBooth merged commit bfce054 into jashkenas:master Apr 19, 2017
@GeoffreyBooth GeoffreyBooth deleted the 3738 branch April 19, 2017 07:13
EsrefDurna pushed a commit to EsrefDurna/coffeescript that referenced this pull request Nov 12, 2025
* Fix parenthesized conditions in if-else assignment

* Add compiled output

* Use ‘is’ instead of ‘==‘; ‘right’ is a poor name when you mean ‘correct,’ not the right-hand side of the assignments in this test
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.

3 participants