-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
Description
I remember discussing dangling else in this repo but I can't seem to find the issue anymore. We did not discuss this specific case tho and I do think it's a bug.
Input Code
if coffee then if latte then 1 else 0
if coffee then brew if latte then 1 else 0
Expected Behavior
if (coffee) {
if (latte) {
1;
} else {
0;
}
}
if (coffee) {
brew(latte ? 1 : 0);
}
Current Behavior
if (coffee) {
if (latte) {
1;
} else {
0;
}
}
if (coffee) {
brew(latte ? 1 : void 0);
} else {
0;
}
Possible Solution
Context
Environment
- CoffeeScript version: 2.3.2
- Node.js version: any