diff options
Diffstat (limited to 'deps/v8/test/mjsunit/es6/block-let-declaration-sloppy.js')
-rw-r--r-- | deps/v8/test/mjsunit/es6/block-let-declaration-sloppy.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/deps/v8/test/mjsunit/es6/block-let-declaration-sloppy.js b/deps/v8/test/mjsunit/es6/block-let-declaration-sloppy.js index ea0e39bd07..1611d44558 100644 --- a/deps/v8/test/mjsunit/es6/block-let-declaration-sloppy.js +++ b/deps/v8/test/mjsunit/es6/block-let-declaration-sloppy.js @@ -118,19 +118,19 @@ TestLocalDoesNotThrow("switch (true) { case true: class x { }; }"); TestLocalDoesNotThrow("switch (true) { default: class x { }; }"); // Test that redeclarations of functions are only allowed in outermost scope. -TestLocalThrows("{ let f; var f; }"); -TestLocalThrows("{ var f; let f; }"); -TestLocalThrows("{ function f() {} let f; }"); -TestLocalThrows("{ let f; function f() {} }"); -TestLocalThrows("{ function f() {} var f; }"); -TestLocalThrows("{ var f; function f() {} }"); -TestLocalThrows("{ function f() {} class f {} }"); -TestLocalThrows("{ class f {}; function f() {} }"); -TestLocalThrows("{ function f() {} function f() {} }"); -TestLocalThrows("function f() {} let f;"); -TestLocalThrows("let f; function f() {}"); -TestLocalThrows("function f() {} class f {}"); -TestLocalThrows("class f {}; function f() {}"); +TestLocalThrows("{ let f; var f; }", SyntaxError); +TestLocalThrows("{ var f; let f; }", SyntaxError); +TestLocalThrows("{ function f() {} let f; }", SyntaxError); +TestLocalThrows("{ let f; function f() {} }", SyntaxError); +TestLocalThrows("{ function f() {} var f; }", SyntaxError); +TestLocalThrows("{ var f; function f() {} }", SyntaxError); +TestLocalThrows("{ function f() {} class f {} }", SyntaxError); +TestLocalThrows("{ class f {}; function f() {} }", SyntaxError); +TestLocalThrows("{ function f() {} function f() {} }", SyntaxError); +TestLocalThrows("function f() {} let f;", SyntaxError); +TestLocalThrows("let f; function f() {}", SyntaxError); +TestLocalThrows("function f() {} class f {}", SyntaxError); +TestLocalThrows("class f {}; function f() {}", SyntaxError); TestLocalDoesNotThrow("function arg() {}"); TestLocalDoesNotThrow("function f() {} var f;"); TestLocalDoesNotThrow("var f; function f() {}"); |