add default initializer to let variables within loop bodies and fix excessive break replacement inside of switches in let scoping - fixes #255

This commit is contained in:
Sebastian McKenzie
2014-12-06 23:35:47 +11:00
parent 21599d3a9a
commit 75c8d73d35
4 changed files with 64 additions and 4 deletions

View File

@@ -0,0 +1,11 @@
while (value) {
let foo;
if (bar) {
foo = [];
}
if (foo) {
doIt();
}
}

View File

@@ -0,0 +1,13 @@
"use strict";
while (value) {
var foo = undefined;
if (bar) {
foo = [];
}
if (foo) {
doIt();
}
}