-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
Has PRSpec: Do Expressionshelp wantedoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
Issue originally made by @AppShipIt
Bug information
- Babel version: 6.3.17
- Node version: 5.0.0
- npm version: 3.5.1
Options
{
"presets": [
"es2015",
"stage-0"
]
}
Input code
const testSwitch = () => do {
switch (new Date().getDay()) {
case 0: case 6: "weekend 🚵"; break
default: "weekday 🚴"
}
}
alert(`Today is a ${testSwitch() || "🐛"}`)
Description
Per [[ https://twitter.com/BrendanEich/status/676497551495856129 | tweet ]] from Brendan Eich:
Expected
"use strict";
var testSwitch = function testSwitch() {
return (function () {
switch (new Date().getDay()) {
case 0:case 6:
return "weekend 🚵";
default:
return "weekday 🚴";
}
})();
};
alert("Today is a " + (testSwitch() || "🐛"));
Got
"use strict";
var testSwitch = function testSwitch() {
return (function () {
switch (new Date().getDay()) {
case 0:case 6:
"weekend 🚵";break;
default:
"weekday 🚴";
}
})();
};
alert("Today is a " + (testSwitch() || "🐛"));
[[ http://codepen.io/dnalot/pen/VewJez | Live demo ]]
Metadata
Metadata
Assignees
Labels
Has PRSpec: Do Expressionshelp wantedoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue