<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[206594] trunk/LayoutTests</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/206594">206594</a></dd>
<dt>Author</dt> <dd>sbarati@apple.com</dd>
<dt>Date</dt> <dd>2016-09-29 11:44:14 -0700 (Thu, 29 Sep 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>parser-syntax-check should display the output of syntax errors
https://bugs.webkit.org/show_bug.cgi?id=162738
Reviewed by Joseph Pecoraro.
It's good to have this test display the syntax error messages
when we're expecting a syntax error because it will both allow
us to track changes in error messages and verify that we get
the expected error message when writing new tests.
* js/parser-syntax-check-expected.txt:
* js/script-tests/parser-syntax-check.js:
(runTest):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsjsparsersyntaxcheckexpectedtxt">trunk/LayoutTests/js/parser-syntax-check-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsparsersyntaxcheckjs">trunk/LayoutTests/js/script-tests/parser-syntax-check.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (206593 => 206594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-09-29 18:19:31 UTC (rev 206593)
+++ trunk/LayoutTests/ChangeLog        2016-09-29 18:44:14 UTC (rev 206594)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-09-29 Saam Barati <sbarati@apple.com>
+
+ parser-syntax-check should display the output of syntax errors
+ https://bugs.webkit.org/show_bug.cgi?id=162738
+
+ Reviewed by Joseph Pecoraro.
+
+ It's good to have this test display the syntax error messages
+ when we're expecting a syntax error because it will both allow
+ us to track changes in error messages and verify that we get
+ the expected error message when writing new tests.
+
+ * js/parser-syntax-check-expected.txt:
+ * js/script-tests/parser-syntax-check.js:
+ (runTest):
+
</ins><span class="cx"> 2016-09-29 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> Fix hit testing on display:block <svg> elements
</span></span></pre></div>
<a id="trunkLayoutTestsjsparsersyntaxcheckexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/parser-syntax-check-expected.txt (206593 => 206594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/parser-syntax-check-expected.txt        2016-09-29 18:19:31 UTC (rev 206593)
+++ trunk/LayoutTests/js/parser-syntax-check-expected.txt        2016-09-29 18:44:14 UTC (rev 206594)
</span><span class="lines">@@ -6,22 +6,22 @@
</span><span class="cx"> Unary operators and member access
</span><span class="cx"> PASS Valid: ""
</span><span class="cx"> PASS Valid: "function f() { }"
</span><del>-PASS Invalid: "(a"
-PASS Invalid: "function f() { (a }"
-PASS Invalid: "a[5"
-PASS Invalid: "function f() { a[5 }"
-PASS Invalid: "a[5 + 6"
-PASS Invalid: "function f() { a[5 + 6 }"
-PASS Invalid: "a."
-PASS Invalid: "function f() { a. }"
-PASS Invalid: "()"
-PASS Invalid: "function f() { () }"
-PASS Invalid: "a.'l'"
-PASS Invalid: "function f() { a.'l' }"
</del><ins>+PASS Invalid: "(a". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { (a }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected ')' to end a compound expression."
+PASS Invalid: "a[5". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { a[5 }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected ']' to end a subscript expression."
+PASS Invalid: "a[5 + 6". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { a[5 + 6 }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected ']' to end a subscript expression."
+PASS Invalid: "a.". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { a. }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected a property name after '.'."
+PASS Invalid: "()". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { () }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "a.'l'". Produced the following syntax error: "SyntaxError: Unexpected string literal 'l'. Expected a property name after '.'."
+PASS Invalid: "function f() { a.'l' }". Produced the following syntax error: "SyntaxError: Unexpected string literal 'l'. Expected a property name after '.'."
</ins><span class="cx"> PASS Valid: "a: +~!new a" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { a: +~!new a }"
</span><del>-PASS Invalid: "new -a"
-PASS Invalid: "function f() { new -a }"
</del><ins>+PASS Invalid: "new -a". Produced the following syntax error: "SyntaxError: Unexpected token '-'"
+PASS Invalid: "function f() { new -a }". Produced the following syntax error: "SyntaxError: Unexpected token '-'"
</ins><span class="cx"> PASS Valid: "new (-1)" with TypeError
</span><span class="cx"> PASS Valid: "function f() { new (-1) }"
</span><span class="cx"> PASS Valid: "a: b: c: new f(x++)++" with ReferenceError
</span><span class="lines">@@ -30,10 +30,10 @@
</span><span class="cx"> PASS Valid: "function f() { (a)++ }"
</span><span class="cx"> PASS Valid: "(1--).x" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { (1--).x }"
</span><del>-PASS Invalid: "a-- ++"
-PASS Invalid: "function f() { a-- ++ }"
-PASS Invalid: "(a:) --b"
-PASS Invalid: "function f() { (a:) --b }"
</del><ins>+PASS Invalid: "a-- ++". Produced the following syntax error: "SyntaxError: Unexpected token '++'"
+PASS Invalid: "function f() { a-- ++ }". Produced the following syntax error: "SyntaxError: Unexpected token '++'"
+PASS Invalid: "(a:) --b". Produced the following syntax error: "SyntaxError: Unexpected token ':'. Expected ')' to end a compound expression."
+PASS Invalid: "function f() { (a:) --b }". Produced the following syntax error: "SyntaxError: Unexpected token ':'. Expected ')' to end a compound expression."
</ins><span class="cx"> PASS Valid: "++ -- ++ a" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { ++ -- ++ a }"
</span><span class="cx"> PASS Valid: "++ new new a ++" with ReferenceError
</span><span class="lines">@@ -40,10 +40,10 @@
</span><span class="cx"> PASS Valid: "function f() { ++ new new a ++ }"
</span><span class="cx"> PASS Valid: "delete void 0"
</span><span class="cx"> PASS Valid: "function f() { delete void 0 }"
</span><del>-PASS Invalid: "delete the void"
-PASS Invalid: "function f() { delete the void }"
-PASS Invalid: "(a++"
-PASS Invalid: "function f() { (a++ }"
</del><ins>+PASS Invalid: "delete the void". Produced the following syntax error: "SyntaxError: Unexpected keyword 'void'. Parse error."
+PASS Invalid: "function f() { delete the void }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'void'. Parse error."
+PASS Invalid: "(a++". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { (a++ }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected ')' to end a compound expression."
</ins><span class="cx"> PASS Valid: "++a--" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { ++a-- }"
</span><span class="cx"> PASS Valid: "++((a))--" with ReferenceError
</span><span class="lines">@@ -50,20 +50,20 @@
</span><span class="cx"> PASS Valid: "function f() { ++((a))-- }"
</span><span class="cx"> PASS Valid: "(a.x++)++" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { (a.x++)++ }"
</span><del>-PASS Invalid: "1: null"
-PASS Invalid: "function f() { 1: null }"
-PASS Invalid: "+-!~"
-PASS Invalid: "function f() { +-!~ }"
-PASS Invalid: "+-!~(("
-PASS Invalid: "function f() { +-!~(( }"
-PASS Invalid: "a)"
-PASS Invalid: "function f() { a) }"
-PASS Invalid: "a]"
-PASS Invalid: "function f() { a] }"
-PASS Invalid: ".l"
-PASS Invalid: "function f() { .l }"
-PASS Invalid: "1.l"
-PASS Invalid: "function f() { 1.l }"
</del><ins>+PASS Invalid: "1: null". Produced the following syntax error: "SyntaxError: Unexpected token ':'. Parse error."
+PASS Invalid: "function f() { 1: null }". Produced the following syntax error: "SyntaxError: Unexpected token ':'. Parse error."
+PASS Invalid: "+-!~". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { +-!~ }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "+-!~((". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { +-!~(( }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "a)". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { a) }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "a]". Produced the following syntax error: "SyntaxError: Unexpected token ']'"
+PASS Invalid: "function f() { a] }". Produced the following syntax error: "SyntaxError: Unexpected token ']'"
+PASS Invalid: ".l". Produced the following syntax error: "SyntaxError: Unexpected token '.'"
+PASS Invalid: "function f() { .l }". Produced the following syntax error: "SyntaxError: Unexpected token '.'"
+PASS Invalid: "1.l". Produced the following syntax error: "SyntaxError: No identifiers allowed directly after numeric literal"
+PASS Invalid: "function f() { 1.l }". Produced the following syntax error: "SyntaxError: No identifiers allowed directly after numeric literal"
</ins><span class="cx"> PASS Valid: "1 .l"
</span><span class="cx"> PASS Valid: "function f() { 1 .l }"
</span><span class="cx"> Octal numbers
</span><span class="lines">@@ -71,31 +71,31 @@
</span><span class="cx"> PASS Valid: "function f() { 'use strict'; 0 }"
</span><span class="cx"> PASS Valid: "0"
</span><span class="cx"> PASS Valid: "function f() { 0 }"
</span><del>-PASS Invalid: "'use strict'; 00"
-PASS Invalid: "function f() { 'use strict'; 00 }"
</del><ins>+PASS Invalid: "'use strict'; 00". Produced the following syntax error: "SyntaxError: Decimal integer literals with a leading zero are forbidden in strict mode"
+PASS Invalid: "function f() { 'use strict'; 00 }". Produced the following syntax error: "SyntaxError: Decimal integer literals with a leading zero are forbidden in strict mode"
</ins><span class="cx"> PASS Valid: "00"
</span><span class="cx"> PASS Valid: "function f() { 00 }"
</span><del>-PASS Invalid: "'use strict'; 08"
-PASS Invalid: "function f() { 'use strict'; 08 }"
</del><ins>+PASS Invalid: "'use strict'; 08". Produced the following syntax error: "SyntaxError: Decimal integer literals with a leading zero are forbidden in strict mode"
+PASS Invalid: "function f() { 'use strict'; 08 }". Produced the following syntax error: "SyntaxError: Decimal integer literals with a leading zero are forbidden in strict mode"
</ins><span class="cx"> PASS Valid: "08"
</span><span class="cx"> PASS Valid: "function f() { 08 }"
</span><del>-PASS Invalid: "'use strict'; 09"
-PASS Invalid: "function f() { 'use strict'; 09 }"
</del><ins>+PASS Invalid: "'use strict'; 09". Produced the following syntax error: "SyntaxError: Decimal integer literals with a leading zero are forbidden in strict mode"
+PASS Invalid: "function f() { 'use strict'; 09 }". Produced the following syntax error: "SyntaxError: Decimal integer literals with a leading zero are forbidden in strict mode"
</ins><span class="cx"> PASS Valid: "09"
</span><span class="cx"> PASS Valid: "function f() { 09 }"
</span><span class="cx"> Binary and conditional operators
</span><span class="cx"> PASS Valid: "a + + typeof this" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { a + + typeof this }"
</span><del>-PASS Invalid: "a + * b"
-PASS Invalid: "function f() { a + * b }"
-PASS Invalid: "a ? b"
-PASS Invalid: "function f() { a ? b }"
-PASS Invalid: "a ? b :"
-PASS Invalid: "function f() { a ? b : }"
-PASS Invalid: "%a"
-PASS Invalid: "function f() { %a }"
-PASS Invalid: "a-"
-PASS Invalid: "function f() { a- }"
</del><ins>+PASS Invalid: "a + * b". Produced the following syntax error: "SyntaxError: Unexpected token '*'"
+PASS Invalid: "function f() { a + * b }". Produced the following syntax error: "SyntaxError: Unexpected token '*'"
+PASS Invalid: "a ? b". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { a ? b }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected ':' in ternary operator."
+PASS Invalid: "a ? b :". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { a ? b : }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "%a". Produced the following syntax error: "SyntaxError: Unexpected token '%'"
+PASS Invalid: "function f() { %a }". Produced the following syntax error: "SyntaxError: Unexpected token '%'"
+PASS Invalid: "a-". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { a- }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
</ins><span class="cx"> PASS Valid: "a = b ? b = c : d = e" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { a = b ? b = c : d = e }"
</span><span class="cx"> PASS Valid: "s: a[1].l ? b.l['s'] ? c++ : d : true" with ReferenceError
</span><span class="lines">@@ -104,20 +104,20 @@
</span><span class="cx"> PASS Valid: "function f() { a ? b + 1 ? c + 3 * d.l : d[5][6] : e }"
</span><span class="cx"> PASS Valid: "a in b instanceof delete -c" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { a in b instanceof delete -c }"
</span><del>-PASS Invalid: "a in instanceof b.l"
-PASS Invalid: "function f() { a in instanceof b.l }"
</del><ins>+PASS Invalid: "a in instanceof b.l". Produced the following syntax error: "SyntaxError: Unexpected keyword 'instanceof'"
+PASS Invalid: "function f() { a in instanceof b.l }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'instanceof'"
</ins><span class="cx"> PASS Valid: "- - true % 5"
</span><span class="cx"> PASS Valid: "function f() { - - true % 5 }"
</span><del>-PASS Invalid: "- false = 3"
-PASS Invalid: "function f() { - false = 3 }"
</del><ins>+PASS Invalid: "- false = 3". Produced the following syntax error: "SyntaxError: Left hand side of operator '=' must be a reference."
+PASS Invalid: "function f() { - false = 3 }". Produced the following syntax error: "SyntaxError: Left hand side of operator '=' must be a reference."
</ins><span class="cx"> PASS Valid: "a: b: c: (1 + null) = 3" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { a: b: c: (1 + null) = 3 }"
</span><span class="cx"> PASS Valid: "a[2] = b.l += c /= 4 * 7 ^ !6" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { a[2] = b.l += c /= 4 * 7 ^ !6 }"
</span><del>-PASS Invalid: "a + typeof b += c in d"
-PASS Invalid: "function f() { a + typeof b += c in d }"
-PASS Invalid: "typeof a &= typeof b"
-PASS Invalid: "function f() { typeof a &= typeof b }"
</del><ins>+PASS Invalid: "a + typeof b += c in d". Produced the following syntax error: "SyntaxError: Left hand side of operator '+=' must be a reference."
+PASS Invalid: "function f() { a + typeof b += c in d }". Produced the following syntax error: "SyntaxError: Left hand side of operator '+=' must be a reference."
+PASS Invalid: "typeof a &= typeof b". Produced the following syntax error: "SyntaxError: Left hand side of operator '&=' must be a reference."
+PASS Invalid: "function f() { typeof a &= typeof b }". Produced the following syntax error: "SyntaxError: Left hand side of operator '&=' must be a reference."
</ins><span class="cx"> PASS Valid: "a: ((typeof (a))) >>>= a || b.l && c" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { a: ((typeof (a))) >>>= a || b.l && c }"
</span><span class="cx"> PASS Valid: "a: b: c[a /= f[a %= b]].l[c[x] = 7] -= a ? b <<= f : g" with ReferenceError
</span><span class="lines">@@ -131,26 +131,26 @@
</span><span class="cx"> PASS Valid: "function f() { s: l: a[2](4 == 6, 5 = 6)(f[4], 6) }"
</span><span class="cx"> PASS Valid: "s: eval(a.apply(), b.call(c[5] - f[7]))" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { s: eval(a.apply(), b.call(c[5] - f[7])) }"
</span><del>-PASS Invalid: "a("
-PASS Invalid: "function f() { a( }"
-PASS Invalid: "a(5"
-PASS Invalid: "function f() { a(5 }"
-PASS Invalid: "a(5,"
-PASS Invalid: "function f() { a(5, }"
</del><ins>+PASS Invalid: "a(". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { a( }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "a(5". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { a(5 }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected ')' to end an argument list."
+PASS Invalid: "a(5,". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { a(5, }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
</ins><span class="cx"> PASS Valid: "a(5,)" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { a(5,) }"
</span><del>-PASS Invalid: "a(5,6"
-PASS Invalid: "function f() { a(5,6 }"
</del><ins>+PASS Invalid: "a(5,6". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { a(5,6 }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected ')' to end an argument list."
</ins><span class="cx"> PASS Valid: "a(b[7], c <d> e.l, new a() > b)" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { a(b[7], c <d> e.l, new a() > b) }"
</span><del>-PASS Invalid: "a(b[5)"
-PASS Invalid: "function f() { a(b[5) }"
-PASS Invalid: "a(b.)"
-PASS Invalid: "function f() { a(b.) }"
</del><ins>+PASS Invalid: "a(b[5)". Produced the following syntax error: "SyntaxError: Unexpected token ')'. Expected ']' to end a subscript expression."
+PASS Invalid: "function f() { a(b[5) }". Produced the following syntax error: "SyntaxError: Unexpected token ')'. Expected ']' to end a subscript expression."
+PASS Invalid: "a(b.)". Produced the following syntax error: "SyntaxError: Unexpected token ')'. Expected a property name after '.'."
+PASS Invalid: "function f() { a(b.) }". Produced the following syntax error: "SyntaxError: Unexpected token ')'. Expected a property name after '.'."
</ins><span class="cx"> PASS Valid: "~new new a(1)(i++)(c[l])" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { ~new new a(1)(i++)(c[l]) }"
</span><del>-PASS Invalid: "a(*a)"
-PASS Invalid: "function f() { a(*a) }"
</del><ins>+PASS Invalid: "a(*a)". Produced the following syntax error: "SyntaxError: Unexpected token '*'"
+PASS Invalid: "function f() { a(*a) }". Produced the following syntax error: "SyntaxError: Unexpected token '*'"
</ins><span class="cx"> PASS Valid: "((((a))((b)()).l))()" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { ((((a))((b)()).l))() }"
</span><span class="cx"> PASS Valid: "(a)[b + (c) / (d())].l--" with ReferenceError
</span><span class="lines">@@ -157,81 +157,81 @@
</span><span class="cx"> PASS Valid: "function f() { (a)[b + (c) / (d())].l-- }"
</span><span class="cx"> PASS Valid: "new (5)" with TypeError
</span><span class="cx"> PASS Valid: "function f() { new (5) }"
</span><del>-PASS Invalid: "new a(5"
-PASS Invalid: "function f() { new a(5 }"
</del><ins>+PASS Invalid: "new a(5". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { new a(5 }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected ')' to end an argument list."
</ins><span class="cx"> PASS Valid: "new (f + 5)(6, (g)() - 'l'() - true(false))" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { new (f + 5)(6, (g)() - 'l'() - true(false)) }"
</span><del>-PASS Invalid: "a(.length)"
-PASS Invalid: "function f() { a(.length) }"
</del><ins>+PASS Invalid: "a(.length)". Produced the following syntax error: "SyntaxError: Unexpected token '.'"
+PASS Invalid: "function f() { a(.length) }". Produced the following syntax error: "SyntaxError: Unexpected token '.'"
</ins><span class="cx"> function declaration and expression
</span><span class="cx"> PASS Valid: "function f() {}"
</span><span class="cx"> PASS Valid: "function f() { function f() {} }"
</span><span class="cx"> PASS Valid: "function f(a,b) {}"
</span><span class="cx"> PASS Valid: "function f() { function f(a,b) {} }"
</span><del>-PASS Invalid: "function () {}"
-PASS Invalid: "function f() { function () {} }"
-PASS Invalid: "function f(a b) {}"
-PASS Invalid: "function f() { function f(a b) {} }"
</del><ins>+PASS Invalid: "function () {}". Produced the following syntax error: "SyntaxError: Function statements must have a name."
+PASS Invalid: "function f() { function () {} }". Produced the following syntax error: "SyntaxError: Function statements must have a name."
+PASS Invalid: "function f(a b) {}". Produced the following syntax error: "SyntaxError: Unexpected identifier 'b'. Expected a ')' or a ',' after a parameter declaration."
+PASS Invalid: "function f() { function f(a b) {} }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'b'. Expected a ')' or a ',' after a parameter declaration."
</ins><span class="cx"> PASS Valid: "function f(a,) {}"
</span><span class="cx"> PASS Valid: "function f() { function f(a,) {} }"
</span><del>-PASS Invalid: "function f(a,"
-PASS Invalid: "function f() { function f(a, }"
-PASS Invalid: "function f(a, 1) {}"
-PASS Invalid: "function f() { function f(a, 1) {} }"
</del><ins>+PASS Invalid: "function f(a,". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { function f(a, }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "function f(a, 1) {}". Produced the following syntax error: "SyntaxError: Unexpected number '1'. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "function f() { function f(a, 1) {} }". Produced the following syntax error: "SyntaxError: Unexpected number '1'. Expected a parameter pattern or a ')' in parameter list."
</ins><span class="cx"> PASS Valid: "function g(arguments, eval) {}"
</span><span class="cx"> PASS Valid: "function f() { function g(arguments, eval) {} }"
</span><span class="cx"> PASS Valid: "function f() {} + function g() {}"
</span><span class="cx"> PASS Valid: "function f() { function f() {} + function g() {} }"
</span><del>-PASS Invalid: "(function a{})"
-PASS Invalid: "function f() { (function a{}) }"
-PASS Invalid: "(function this(){})"
-PASS Invalid: "function f() { (function this(){}) }"
</del><ins>+PASS Invalid: "(function a{})". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected an opening '(' before a function's parameter list."
+PASS Invalid: "function f() { (function a{}) }". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected an opening '(' before a function's parameter list."
+PASS Invalid: "(function this(){})". Produced the following syntax error: "SyntaxError: Cannot use the keyword 'this' as a function name."
+PASS Invalid: "function f() { (function this(){}) }". Produced the following syntax error: "SyntaxError: Cannot use the keyword 'this' as a function name."
</ins><span class="cx"> PASS Valid: "(delete new function f(){} + function(a,b){}(5)(6))" with TypeError
</span><span class="cx"> PASS Valid: "function f() { (delete new function f(){} + function(a,b){}(5)(6)) }"
</span><span class="cx"> PASS Valid: "6 - function (m) { function g() {} }"
</span><span class="cx"> PASS Valid: "function f() { 6 - function (m) { function g() {} } }"
</span><del>-PASS Invalid: "function l() {"
-PASS Invalid: "function f() { function l() { }"
-PASS Invalid: "function l++(){}"
-PASS Invalid: "function f() { function l++(){} }"
</del><ins>+PASS Invalid: "function l() {". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { function l() { }". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function l++(){}". Produced the following syntax error: "SyntaxError: Unexpected token '++'. Expected an opening '(' before a function's parameter list."
+PASS Invalid: "function f() { function l++(){} }". Produced the following syntax error: "SyntaxError: Unexpected token '++'. Expected an opening '(' before a function's parameter list."
</ins><span class="cx"> Array and object literal, comma operator
</span><span class="cx"> PASS Valid: "[] in [5,6] * [,5,] / [,,5,,] || [a,] && new [,b] % [,,]" with TypeError
</span><span class="cx"> PASS Valid: "function f() { [] in [5,6] * [,5,] / [,,5,,] || [a,] && new [,b] % [,,] }"
</span><del>-PASS Invalid: "[5,"
-PASS Invalid: "function f() { [5, }"
-PASS Invalid: "[,"
-PASS Invalid: "function f() { [, }"
-PASS Invalid: "(a,)"
-PASS Invalid: "function f() { (a,) }"
</del><ins>+PASS Invalid: "[5,". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { [5, }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "[,". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { [, }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "(a,)". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { (a,) }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
</ins><span class="cx"> PASS Valid: "1 + {get get(){}, set set(a){}, get1:4, set1:get-set, }" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { 1 + {get get(){}, set set(a){}, get1:4, set1:get-set, } }"
</span><del>-PASS Invalid: "1 + {a"
-PASS Invalid: "function f() { 1 + {a }"
-PASS Invalid: "1 + {a:"
-PASS Invalid: "function f() { 1 + {a: }"
-PASS Invalid: "1 + {get l("
-PASS Invalid: "function f() { 1 + {get l( }"
-PASS Invalid: ",a"
-PASS Invalid: "function f() { ,a }"
</del><ins>+PASS Invalid: "1 + {a". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { 1 + {a }". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "1 + {a:". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { 1 + {a: }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "1 + {get l(". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { 1 + {get l( }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. getter functions must have no parameters."
+PASS Invalid: ",a". Produced the following syntax error: "SyntaxError: Unexpected token ','"
+PASS Invalid: "function f() { ,a }". Produced the following syntax error: "SyntaxError: Unexpected token ','"
</ins><span class="cx"> PASS Valid: "(4,(5,a(3,4))),f[4,a-6]" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { (4,(5,a(3,4))),f[4,a-6] }"
</span><del>-PASS Invalid: "(,f)"
-PASS Invalid: "function f() { (,f) }"
-PASS Invalid: "a,,b"
-PASS Invalid: "function f() { a,,b }"
-PASS Invalid: "a ? b, c : d"
-PASS Invalid: "function f() { a ? b, c : d }"
</del><ins>+PASS Invalid: "(,f)". Produced the following syntax error: "SyntaxError: Unexpected token ','"
+PASS Invalid: "function f() { (,f) }". Produced the following syntax error: "SyntaxError: Unexpected token ','"
+PASS Invalid: "a,,b". Produced the following syntax error: "SyntaxError: Unexpected token ','"
+PASS Invalid: "function f() { a,,b }". Produced the following syntax error: "SyntaxError: Unexpected token ','"
+PASS Invalid: "a ? b, c : d". Produced the following syntax error: "SyntaxError: Unexpected token ','. Expected ':' in ternary operator."
+PASS Invalid: "function f() { a ? b, c : d }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Expected ':' in ternary operator."
</ins><span class="cx"> simple statements
</span><span class="cx"> PASS Valid: "{ }"
</span><span class="cx"> PASS Valid: "function f() { { } }"
</span><del>-PASS Invalid: "{ { }"
-PASS Invalid: "function f() { { { } }"
</del><ins>+PASS Invalid: "{ { }". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { { { } }". Produced the following syntax error: "SyntaxError: Unexpected end of script"
</ins><span class="cx"> PASS Valid: "{ ; ; ; }"
</span><span class="cx"> PASS Valid: "function f() { { ; ; ; } }"
</span><span class="cx"> PASS Valid: "a: { ; }"
</span><span class="cx"> PASS Valid: "function f() { a: { ; } }"
</span><del>-PASS Invalid: "{ a: }"
-PASS Invalid: "function f() { { a: } }"
</del><ins>+PASS Invalid: "{ a: }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Cannot parse statement."
+PASS Invalid: "function f() { { a: } }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Cannot parse statement."
</ins><span class="cx"> PASS Valid: "{} f; { 6 + f() }" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { {} f; { 6 + f() } }"
</span><span class="cx"> PASS Valid: "{ a[5],6; {} ++b-new (-5)() } c().l++" with ReferenceError
</span><span class="lines">@@ -240,42 +240,42 @@
</span><span class="cx"> PASS Valid: "function f() { { l1: l2: l3: { this } a = 32 ; { i++ ; { { { } } ++i } } } }"
</span><span class="cx"> PASS Valid: "if (a) ;"
</span><span class="cx"> PASS Valid: "function f() { if (a) ; }"
</span><del>-PASS Invalid: "{ if (a) }"
-PASS Invalid: "function f() { { if (a) } }"
-PASS Invalid: "if a {}"
-PASS Invalid: "function f() { if a {} }"
-PASS Invalid: "if (a"
-PASS Invalid: "function f() { if (a }"
-PASS Invalid: "if (a { }"
-PASS Invalid: "function f() { if (a { } }"
</del><ins>+PASS Invalid: "{ if (a) }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected a statement as the body of an if block."
+PASS Invalid: "function f() { { if (a) } }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected a statement as the body of an if block."
+PASS Invalid: "if a {}". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. Expected '(' to start an 'if' condition."
+PASS Invalid: "function f() { if a {} }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. Expected '(' to start an 'if' condition."
+PASS Invalid: "if (a". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { if (a }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected ')' to end an 'if' condition."
+PASS Invalid: "if (a { }". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected ')' to end an 'if' condition."
+PASS Invalid: "function f() { if (a { } }". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected ')' to end an 'if' condition."
</ins><span class="cx"> PASS Valid: "x: s: if (a) ; else b"
</span><span class="cx"> PASS Valid: "function f() { x: s: if (a) ; else b }"
</span><del>-PASS Invalid: "else {}"
-PASS Invalid: "function f() { else {} }"
</del><ins>+PASS Invalid: "else {}". Produced the following syntax error: "SyntaxError: Unexpected keyword 'else'"
+PASS Invalid: "function f() { else {} }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'else'"
</ins><span class="cx"> PASS Valid: "if (a) if (b) y; else {} else ;" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { if (a) if (b) y; else {} else ; }"
</span><del>-PASS Invalid: "if (a) {} else x; else"
-PASS Invalid: "function f() { if (a) {} else x; else }"
-PASS Invalid: "if (a) { else }"
-PASS Invalid: "function f() { if (a) { else } }"
</del><ins>+PASS Invalid: "if (a) {} else x; else". Produced the following syntax error: "SyntaxError: Unexpected keyword 'else'"
+PASS Invalid: "function f() { if (a) {} else x; else }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'else'"
+PASS Invalid: "if (a) { else }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'else'"
+PASS Invalid: "function f() { if (a) { else } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'else'"
</ins><span class="cx"> PASS Valid: "if (a.l + new b()) 4 + 5 - f()" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { if (a.l + new b()) 4 + 5 - f() }"
</span><span class="cx"> PASS Valid: "if (a) with (x) ; else with (y) ;" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { if (a) with (x) ; else with (y) ; }"
</span><del>-PASS Invalid: "with a.b { }"
-PASS Invalid: "function f() { with a.b { } }"
</del><ins>+PASS Invalid: "with a.b { }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. Expected '(' to start a subject of a 'with' statement."
+PASS Invalid: "function f() { with a.b { } }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. Expected '(' to start a subject of a 'with' statement."
</ins><span class="cx"> PASS Valid: "while (a() - new b) ;" with TypeError
</span><span class="cx"> PASS Valid: "function f() { while (a() - new b) ; }"
</span><del>-PASS Invalid: "while a {}"
-PASS Invalid: "function f() { while a {} }"
</del><ins>+PASS Invalid: "while a {}". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. Expected '(' to start a while loop condition."
+PASS Invalid: "function f() { while a {} }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. Expected '(' to start a while loop condition."
</ins><span class="cx"> PASS Valid: "do ; while(0) i++" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { do ; while(0) i++ }"
</span><span class="cx"> PASS Valid: "do if (a) x; else y; while(z)" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { do if (a) x; else y; while(z) }"
</span><del>-PASS Invalid: "do g; while 4"
-PASS Invalid: "function f() { do g; while 4 }"
-PASS Invalid: "do g; while ((4)"
-PASS Invalid: "function f() { do g; while ((4) }"
</del><ins>+PASS Invalid: "do g; while 4". Produced the following syntax error: "SyntaxError: Unexpected number '4'. Expected '(' to start a do-while loop condition."
+PASS Invalid: "function f() { do g; while 4 }". Produced the following syntax error: "SyntaxError: Unexpected number '4'. Expected '(' to start a do-while loop condition."
+PASS Invalid: "do g; while ((4)". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { do g; while ((4) }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected ')' to end a do-while loop condition."
</ins><span class="cx"> PASS Valid: "{ { do do do ; while(0) while(0) while(0) } }"
</span><span class="cx"> PASS Valid: "function f() { { { do do do ; while(0) while(0) while(0) } } }"
</span><span class="cx"> PASS Valid: "do while (0) if (a) {} else y; while(0)"
</span><span class="lines">@@ -282,95 +282,95 @@
</span><span class="cx"> PASS Valid: "function f() { do while (0) if (a) {} else y; while(0) }"
</span><span class="cx"> PASS Valid: "if (a) while (b) if (c) with(d) {} else e; else f" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { if (a) while (b) if (c) with(d) {} else e; else f }"
</span><del>-PASS Invalid: "break ; break your_limits ; continue ; continue living ; debugger"
-PASS Invalid: "function f() { break ; break your_limits ; continue ; continue living ; debugger }"
-PASS Invalid: "debugger X"
-PASS Invalid: "function f() { debugger X }"
-PASS Invalid: "break 0.2"
-PASS Invalid: "function f() { break 0.2 }"
-PASS Invalid: "continue a++"
-PASS Invalid: "function f() { continue a++ }"
-PASS Invalid: "continue (my_friend)"
-PASS Invalid: "function f() { continue (my_friend) }"
</del><ins>+PASS Invalid: "break ; break your_limits ; continue ; continue living ; debugger". Produced the following syntax error: "SyntaxError: 'break' is only valid inside a switch or loop statement."
+PASS Invalid: "function f() { break ; break your_limits ; continue ; continue living ; debugger }". Produced the following syntax error: "SyntaxError: 'break' is only valid inside a switch or loop statement."
+PASS Invalid: "debugger X". Produced the following syntax error: "SyntaxError: Unexpected identifier 'X'. Debugger keyword must be followed by a ';'."
+PASS Invalid: "function f() { debugger X }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'X'. Debugger keyword must be followed by a ';'."
+PASS Invalid: "break 0.2". Produced the following syntax error: "SyntaxError: Unexpected number '0.2'. Expected an identifier as the target for a break statement."
+PASS Invalid: "function f() { break 0.2 }". Produced the following syntax error: "SyntaxError: Unexpected number '0.2'. Expected an identifier as the target for a break statement."
+PASS Invalid: "continue a++". Produced the following syntax error: "SyntaxError: Cannot use the undeclared label 'a'."
+PASS Invalid: "function f() { continue a++ }". Produced the following syntax error: "SyntaxError: Cannot use the undeclared label 'a'."
+PASS Invalid: "continue (my_friend)". Produced the following syntax error: "SyntaxError: Unexpected token '('. Expected an identifier as the target for a continue statement."
+PASS Invalid: "function f() { continue (my_friend) }". Produced the following syntax error: "SyntaxError: Unexpected token '('. Expected an identifier as the target for a continue statement."
</ins><span class="cx"> PASS Valid: "while (1) break"
</span><span class="cx"> PASS Valid: "function f() { while (1) break }"
</span><span class="cx"> PASS Valid: "do if (a) with (b) continue; else debugger; while (false)" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { do if (a) with (b) continue; else debugger; while (false) }"
</span><del>-PASS Invalid: "do if (a) while (false) else debugger"
-PASS Invalid: "function f() { do if (a) while (false) else debugger }"
-PASS Invalid: "while if (a) ;"
-PASS Invalid: "function f() { while if (a) ; }"
</del><ins>+PASS Invalid: "do if (a) while (false) else debugger". Produced the following syntax error: "SyntaxError: Unexpected keyword 'else'"
+PASS Invalid: "function f() { do if (a) while (false) else debugger }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'else'"
+PASS Invalid: "while if (a) ;". Produced the following syntax error: "SyntaxError: Unexpected keyword 'if'. Expected '(' to start a while loop condition."
+PASS Invalid: "function f() { while if (a) ; }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'if'. Expected '(' to start a while loop condition."
</ins><span class="cx"> PASS Valid: "if (a) function f() {} else function g() {}"
</span><span class="cx"> PASS Valid: "function f() { if (a) function f() {} else function g() {} }"
</span><del>-PASS Invalid: "if (a()) while(0) function f() {} else function g() {}"
-PASS Invalid: "function f() { if (a()) while(0) function f() {} else function g() {} }"
-PASS Invalid: "if (a()) function f() { else function g() }"
-PASS Invalid: "function f() { if (a()) function f() { else function g() } }"
-PASS Invalid: "if (a) if (b) ; else function f {}"
-PASS Invalid: "function f() { if (a) if (b) ; else function f {} }"
-PASS Invalid: "if (a) if (b) ; else function (){}"
-PASS Invalid: "function f() { if (a) if (b) ; else function (){} }"
</del><ins>+PASS Invalid: "if (a()) while(0) function f() {} else function g() {}". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "function f() { if (a()) while(0) function f() {} else function g() {} }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "if (a()) function f() { else function g() }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'else'"
+PASS Invalid: "function f() { if (a()) function f() { else function g() } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'else'"
+PASS Invalid: "if (a) if (b) ; else function f {}". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected an opening '(' before a function's parameter list."
+PASS Invalid: "function f() { if (a) if (b) ; else function f {} }". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected an opening '(' before a function's parameter list."
+PASS Invalid: "if (a) if (b) ; else function (){}". Produced the following syntax error: "SyntaxError: Function statements must have a name."
+PASS Invalid: "function f() { if (a) if (b) ; else function (){} }". Produced the following syntax error: "SyntaxError: Function statements must have a name."
</ins><span class="cx"> PASS Valid: "throw a" with 32
</span><span class="cx"> PASS Valid: "function f() { throw a }"
</span><span class="cx"> PASS Valid: "throw a + b in void c" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { throw a + b in void c }"
</span><del>-PASS Invalid: "throw"
-PASS Invalid: "function f() { throw }"
</del><ins>+PASS Invalid: "throw". Produced the following syntax error: "SyntaxError: Cannot have a newline after 'throw'."
+PASS Invalid: "function f() { throw }". Produced the following syntax error: "SyntaxError: Cannot have a newline after 'throw'."
</ins><span class="cx"> var and const statements
</span><span class="cx"> PASS Valid: "var a, b = null"
</span><span class="cx"> PASS Valid: "function f() { var a, b = null }"
</span><span class="cx"> PASS Valid: "const a = 5, b = 10, c = 20"
</span><span class="cx"> PASS Valid: "function f() { const a = 5, b = 10, c = 20 }"
</span><del>-PASS Invalid: "var"
-PASS Invalid: "function f() { var }"
-PASS Invalid: "var = 7"
-PASS Invalid: "function f() { var = 7 }"
-PASS Invalid: "var c (6)"
-PASS Invalid: "function f() { var c (6) }"
</del><ins>+PASS Invalid: "var". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { var }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "var = 7". Produced the following syntax error: "SyntaxError: Unexpected token '='. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "function f() { var = 7 }". Produced the following syntax error: "SyntaxError: Unexpected token '='. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "var c (6)". Produced the following syntax error: "SyntaxError: Unexpected token '('. Expected ';' after variable declaration."
+PASS Invalid: "function f() { var c (6) }". Produced the following syntax error: "SyntaxError: Unexpected token '('. Expected ';' after variable declaration."
</ins><span class="cx"> PASS Valid: "if (a) var a,b; else { const b = 1, c = 2; }"
</span><span class="cx"> PASS Valid: "function f() { if (a) var a,b; else { const b = 1, c = 2; } }"
</span><del>-PASS Invalid: "if (a) var a,b; else { const b, c }"
-PASS Invalid: "function f() { if (a) var a,b; else { const b, c } }"
-PASS Invalid: "var 5 = 6"
-PASS Invalid: "function f() { var 5 = 6 }"
</del><ins>+PASS Invalid: "if (a) var a,b; else { const b, c }". Produced the following syntax error: "SyntaxError: Unexpected token ','. const declared variable 'b' must have an initializer."
+PASS Invalid: "function f() { if (a) var a,b; else { const b, c } }". Produced the following syntax error: "SyntaxError: Unexpected token ','. const declared variable 'b' must have an initializer."
+PASS Invalid: "var 5 = 6". Produced the following syntax error: "SyntaxError: Unexpected number '5'. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "function f() { var 5 = 6 }". Produced the following syntax error: "SyntaxError: Unexpected number '5'. Expected a parameter pattern or a ')' in parameter list."
</ins><span class="cx"> PASS Valid: "while (0) var a, b, c=6, d, e, f=5*6, g=f*h, h"
</span><span class="cx"> PASS Valid: "function f() { while (0) var a, b, c=6, d, e, f=5*6, g=f*h, h }"
</span><del>-PASS Invalid: "var a = if (b) { c }"
-PASS Invalid: "function f() { var a = if (b) { c } }"
-PASS Invalid: "var a = var b"
-PASS Invalid: "function f() { var a = var b }"
-PASS Invalid: "const a = b += c, a, a, a = (b - f())"
-PASS Invalid: "function f() { const a = b += c, a, a, a = (b - f()) }"
-PASS Invalid: "var a %= b | 5"
-PASS Invalid: "function f() { var a %= b | 5 }"
-PASS Invalid: "var (a) = 5"
-PASS Invalid: "function f() { var (a) = 5 }"
-PASS Invalid: "var a = (4, b = 6"
-PASS Invalid: "function f() { var a = (4, b = 6 }"
-PASS Invalid: "const 'l' = 3"
-PASS Invalid: "function f() { const 'l' = 3 }"
-PASS Invalid: "var var = 3"
-PASS Invalid: "function f() { var var = 3 }"
</del><ins>+PASS Invalid: "var a = if (b) { c }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'if'"
+PASS Invalid: "function f() { var a = if (b) { c } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'if'"
+PASS Invalid: "var a = var b". Produced the following syntax error: "SyntaxError: Unexpected keyword 'var'"
+PASS Invalid: "function f() { var a = var b }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'var'"
+PASS Invalid: "const a = b += c, a, a, a = (b - f())". Produced the following syntax error: "SyntaxError: Cannot declare a const variable twice: 'a'."
+PASS Invalid: "function f() { const a = b += c, a, a, a = (b - f()) }". Produced the following syntax error: "SyntaxError: Cannot declare a const variable twice: 'a'."
+PASS Invalid: "var a %= b | 5". Produced the following syntax error: "SyntaxError: Unexpected token '%='. Expected ';' after variable declaration."
+PASS Invalid: "function f() { var a %= b | 5 }". Produced the following syntax error: "SyntaxError: Unexpected token '%='. Expected ';' after variable declaration."
+PASS Invalid: "var (a) = 5". Produced the following syntax error: "SyntaxError: Unexpected token '('. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "function f() { var (a) = 5 }". Produced the following syntax error: "SyntaxError: Unexpected token '('. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "var a = (4, b = 6". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { var a = (4, b = 6 }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected ')' to end a compound expression."
+PASS Invalid: "const 'l' = 3". Produced the following syntax error: "SyntaxError: Unexpected string literal 'l'. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "function f() { const 'l' = 3 }". Produced the following syntax error: "SyntaxError: Unexpected string literal 'l'. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "var var = 3". Produced the following syntax error: "SyntaxError: Cannot use the keyword 'var' as a variable name."
+PASS Invalid: "function f() { var var = 3 }". Produced the following syntax error: "SyntaxError: Cannot use the keyword 'var' as a variable name."
</ins><span class="cx"> PASS Valid: "var varr = 3 in 1" with TypeError
</span><span class="cx"> PASS Valid: "function f() { var varr = 3 in 1 }"
</span><span class="cx"> PASS Valid: "const a = void 7 - typeof 8, b = 8"
</span><span class="cx"> PASS Valid: "function f() { const a = void 7 - typeof 8, b = 8 }"
</span><del>-PASS Invalid: "const a, a, a = void 7 - typeof 8, a = 8"
-PASS Invalid: "function f() { const a, a, a = void 7 - typeof 8, a = 8 }"
</del><ins>+PASS Invalid: "const a, a, a = void 7 - typeof 8, a = 8". Produced the following syntax error: "SyntaxError: Unexpected token ','. const declared variable 'a' must have an initializer."
+PASS Invalid: "function f() { const a, a, a = void 7 - typeof 8, a = 8 }". Produced the following syntax error: "SyntaxError: Unexpected token ','. const declared variable 'a' must have an initializer."
</ins><span class="cx"> PASS Valid: "const x_x = 6 /= 7 ? e : f" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { const x_x = 6 /= 7 ? e : f }"
</span><del>-PASS Invalid: "var a = ?"
-PASS Invalid: "function f() { var a = ? }"
-PASS Invalid: "const a = *7"
-PASS Invalid: "function f() { const a = *7 }"
-PASS Invalid: "var a = :)"
-PASS Invalid: "function f() { var a = :) }"
</del><ins>+PASS Invalid: "var a = ?". Produced the following syntax error: "SyntaxError: Unexpected token '?'"
+PASS Invalid: "function f() { var a = ? }". Produced the following syntax error: "SyntaxError: Unexpected token '?'"
+PASS Invalid: "const a = *7". Produced the following syntax error: "SyntaxError: Unexpected token '*'"
+PASS Invalid: "function f() { const a = *7 }". Produced the following syntax error: "SyntaxError: Unexpected token '*'"
+PASS Invalid: "var a = :)". Produced the following syntax error: "SyntaxError: Unexpected token ':'"
+PASS Invalid: "function f() { var a = :) }". Produced the following syntax error: "SyntaxError: Unexpected token ':'"
</ins><span class="cx"> PASS Valid: "var a = a in b in c instanceof d" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { var a = a in b in c instanceof d }"
</span><del>-PASS Invalid: "var a = b ? c, b"
-PASS Invalid: "function f() { var a = b ? c, b }"
-PASS Invalid: "const a = b : c"
-PASS Invalid: "function f() { const a = b : c }"
</del><ins>+PASS Invalid: "var a = b ? c, b". Produced the following syntax error: "SyntaxError: Unexpected token ','. Expected ':' in ternary operator."
+PASS Invalid: "function f() { var a = b ? c, b }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Expected ':' in ternary operator."
+PASS Invalid: "const a = b : c". Produced the following syntax error: "SyntaxError: Unexpected token ':'. Expected ';' after variable declaration."
+PASS Invalid: "function f() { const a = b : c }". Produced the following syntax error: "SyntaxError: Unexpected token ':'. Expected ';' after variable declaration."
</ins><span class="cx"> PASS Valid: "const a = 7; eval(''); a++" with TypeError
</span><span class="cx"> PASS Valid: "function f() { const a = 7; eval(''); a++ }"
</span><span class="cx"> PASS Valid: "const a = 7; eval(''); a--" with TypeError
</span><span class="lines">@@ -410,20 +410,20 @@
</span><span class="cx"> PASS Valid: "function f() { for ( a ; ; a ) break }"
</span><span class="cx"> PASS Valid: "for ( ; a ; a ) break"
</span><span class="cx"> PASS Valid: "function f() { for ( ; a ; a ) break }"
</span><del>-PASS Invalid: "for () { }"
-PASS Invalid: "function f() { for () { } }"
-PASS Invalid: "for ( a ) { }"
-PASS Invalid: "function f() { for ( a ) { } }"
-PASS Invalid: "for ( ; ) ;"
-PASS Invalid: "function f() { for ( ; ) ; }"
-PASS Invalid: "for a ; b ; c { }"
-PASS Invalid: "function f() { for a ; b ; c { } }"
-PASS Invalid: "for (a ; { }"
-PASS Invalid: "function f() { for (a ; { } }"
-PASS Invalid: "for ( a ; ) ;"
-PASS Invalid: "function f() { for ( a ; ) ; }"
-PASS Invalid: "for ( ; a ) break"
-PASS Invalid: "function f() { for ( ; a ) break }"
</del><ins>+PASS Invalid: "for () { }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { for () { } }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "for ( a ) { }". Produced the following syntax error: "SyntaxError: Unexpected token ')'. Expected either 'in' or 'of' in enumeration syntax."
+PASS Invalid: "function f() { for ( a ) { } }". Produced the following syntax error: "SyntaxError: Unexpected token ')'. Expected either 'in' or 'of' in enumeration syntax."
+PASS Invalid: "for ( ; ) ;". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { for ( ; ) ; }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "for a ; b ; c { }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. Expected '(' to start a for-loop header."
+PASS Invalid: "function f() { for a ; b ; c { } }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. Expected '(' to start a for-loop header."
+PASS Invalid: "for (a ; { }". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { for (a ; { } }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected a ';' after the for loop condition expression."
+PASS Invalid: "for ( a ; ) ;". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { for ( a ; ) ; }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "for ( ; a ) break". Produced the following syntax error: "SyntaxError: Unexpected token ')'. Expected a ';' after the for loop condition expression."
+PASS Invalid: "function f() { for ( ; a ) break }". Produced the following syntax error: "SyntaxError: Unexpected token ')'. Expected a ';' after the for loop condition expression."
</ins><span class="cx"> PASS Valid: "for (var a, b ; ; ) { break } "
</span><span class="cx"> PASS Valid: "function f() { for (var a, b ; ; ) { break } }"
</span><span class="cx"> PASS Valid: "for (var a = b, b = a ; ; ) break"
</span><span class="lines">@@ -432,12 +432,12 @@
</span><span class="cx"> PASS Valid: "function f() { for (var a = b, c, d, b = a ; x in b ; ) { break } }"
</span><span class="cx"> PASS Valid: "for (var a = b, c, d ; ; 1 in a()) break" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for (var a = b, c, d ; ; 1 in a()) break }"
</span><del>-PASS Invalid: "for ( ; var a ; ) break"
-PASS Invalid: "function f() { for ( ; var a ; ) break }"
-PASS Invalid: "for (const x; ; ) break"
-PASS Invalid: "function f() { for (const x; ; ) break }"
-PASS Invalid: "for (const x = 20, y; ; ) break"
-PASS Invalid: "function f() { for (const x = 20, y; ; ) break }"
</del><ins>+PASS Invalid: "for ( ; var a ; ) break". Produced the following syntax error: "SyntaxError: Unexpected keyword 'var'"
+PASS Invalid: "function f() { for ( ; var a ; ) break }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'var'"
+PASS Invalid: "for (const x; ; ) break". Produced the following syntax error: "SyntaxError: Unexpected token ';'. const variables in for loops must have initializers."
+PASS Invalid: "function f() { for (const x; ; ) break }". Produced the following syntax error: "SyntaxError: Unexpected token ';'. const variables in for loops must have initializers."
+PASS Invalid: "for (const x = 20, y; ; ) break". Produced the following syntax error: "SyntaxError: Unexpected token ';'. const variables in for loops must have initializers."
+PASS Invalid: "function f() { for (const x = 20, y; ; ) break }". Produced the following syntax error: "SyntaxError: Unexpected token ';'. const variables in for loops must have initializers."
</ins><span class="cx"> PASS Valid: "for (const x = 20; ; ) break"
</span><span class="cx"> PASS Valid: "function f() { for (const x = 20; ; ) break }"
</span><span class="cx"> PASS Valid: "for (const x of []) break"
</span><span class="lines">@@ -444,8 +444,8 @@
</span><span class="cx"> PASS Valid: "function f() { for (const x of []) break }"
</span><span class="cx"> PASS Valid: "for (const x in {}) break"
</span><span class="cx"> PASS Valid: "function f() { for (const x in {}) break }"
</span><del>-PASS Invalid: "for (const x = 20, x = 30; ; ) { const x = 20; break; }"
-PASS Invalid: "function f() { for (const x = 20, x = 30; ; ) { const x = 20; break; } }"
</del><ins>+PASS Invalid: "for (const x = 20, x = 30; ; ) { const x = 20; break; }". Produced the following syntax error: "SyntaxError: Cannot declare a const variable twice: 'x'."
+PASS Invalid: "function f() { for (const x = 20, x = 30; ; ) { const x = 20; break; } }". Produced the following syntax error: "SyntaxError: Cannot declare a const variable twice: 'x'."
</ins><span class="cx"> PASS Valid: "for (const x = 20; ; ) { const x = 20; break; }"
</span><span class="cx"> PASS Valid: "function f() { for (const x = 20; ; ) { const x = 20; break; } }"
</span><span class="cx"> PASS Valid: "for (const x of []) { const x = 20; break; }"
</span><span class="lines">@@ -452,20 +452,20 @@
</span><span class="cx"> PASS Valid: "function f() { for (const x of []) { const x = 20; break; } }"
</span><span class="cx"> PASS Valid: "for (const x in {}) { const x = 20; break; }"
</span><span class="cx"> PASS Valid: "function f() { for (const x in {}) { const x = 20; break; } }"
</span><del>-PASS Invalid: "for (const let = 10; ; ) { break; }"
-PASS Invalid: "function f() { for (const let = 10; ; ) { break; } }"
-PASS Invalid: "for (const let in {}) { break; }"
-PASS Invalid: "function f() { for (const let in {}) { break; } }"
-PASS Invalid: "for (const let of []) { break; }"
-PASS Invalid: "function f() { for (const let of []) { break; } }"
-PASS Invalid: "for (let let = 10; ; ) { break; }"
-PASS Invalid: "function f() { for (let let = 10; ; ) { break; } }"
-PASS Invalid: "for (let let in {}) { break; }"
-PASS Invalid: "function f() { for (let let in {}) { break; } }"
-PASS Invalid: "for (let let of []) { break; }"
-PASS Invalid: "function f() { for (let let of []) { break; } }"
-PASS Invalid: "for ( %a ; ; ) { }"
-PASS Invalid: "function f() { for ( %a ; ; ) { } }"
</del><ins>+PASS Invalid: "for (const let = 10; ; ) { break; }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'. Can't use 'let' as an identifier name for a LexicalDeclaration."
+PASS Invalid: "function f() { for (const let = 10; ; ) { break; } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'. Can't use 'let' as an identifier name for a LexicalDeclaration."
+PASS Invalid: "for (const let in {}) { break; }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'. Can't use 'let' as an identifier name for a LexicalDeclaration."
+PASS Invalid: "function f() { for (const let in {}) { break; } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'. Can't use 'let' as an identifier name for a LexicalDeclaration."
+PASS Invalid: "for (const let of []) { break; }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'. Can't use 'let' as an identifier name for a LexicalDeclaration."
+PASS Invalid: "function f() { for (const let of []) { break; } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'. Can't use 'let' as an identifier name for a LexicalDeclaration."
+PASS Invalid: "for (let let = 10; ; ) { break; }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'. Can't use 'let' as an identifier name for a LexicalDeclaration."
+PASS Invalid: "function f() { for (let let = 10; ; ) { break; } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'. Can't use 'let' as an identifier name for a LexicalDeclaration."
+PASS Invalid: "for (let let in {}) { break; }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'. Can't use 'let' as an identifier name for a LexicalDeclaration."
+PASS Invalid: "function f() { for (let let in {}) { break; } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'. Can't use 'let' as an identifier name for a LexicalDeclaration."
+PASS Invalid: "for (let let of []) { break; }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'. Can't use 'let' as an identifier name for a LexicalDeclaration."
+PASS Invalid: "function f() { for (let let of []) { break; } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'. Can't use 'let' as an identifier name for a LexicalDeclaration."
+PASS Invalid: "for ( %a ; ; ) { }". Produced the following syntax error: "SyntaxError: Unexpected token '%'"
+PASS Invalid: "function f() { for ( %a ; ; ) { } }". Produced the following syntax error: "SyntaxError: Unexpected token '%'"
</ins><span class="cx"> PASS Valid: "for (a in b) break" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for (a in b) break }"
</span><span class="cx"> PASS Valid: "for (a() in b) break" with ReferenceError
</span><span class="lines">@@ -476,30 +476,30 @@
</span><span class="cx"> PASS Valid: "function f() { for (new a in b in c in d) break }"
</span><span class="cx"> PASS Valid: "for (new new new a in b) break" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for (new new new a in b) break }"
</span><del>-PASS Invalid: "for (delete new a() in b) break"
-PASS Invalid: "function f() { for (delete new a() in b) break }"
-PASS Invalid: "for (a * a in b) break"
-PASS Invalid: "function f() { for (a * a in b) break }"
</del><ins>+PASS Invalid: "for (delete new a() in b) break". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. Expected a reference on the left hand side of an enumeration statement."
+PASS Invalid: "function f() { for (delete new a() in b) break }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. Expected a reference on the left hand side of an enumeration statement."
+PASS Invalid: "for (a * a in b) break". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. Expected a reference on the left hand side of an enumeration statement."
+PASS Invalid: "function f() { for (a * a in b) break }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. Expected a reference on the left hand side of an enumeration statement."
</ins><span class="cx"> PASS Valid: "for ((a * a) in b) break" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for ((a * a) in b) break }"
</span><del>-PASS Invalid: "for (a++ in b) break"
-PASS Invalid: "function f() { for (a++ in b) break }"
</del><ins>+PASS Invalid: "for (a++ in b) break". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. Expected a reference on the left hand side of an enumeration statement."
+PASS Invalid: "function f() { for (a++ in b) break }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. Expected a reference on the left hand side of an enumeration statement."
</ins><span class="cx"> PASS Valid: "for ((a++) in b) break" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for ((a++) in b) break }"
</span><del>-PASS Invalid: "for (++a in b) break"
-PASS Invalid: "function f() { for (++a in b) break }"
</del><ins>+PASS Invalid: "for (++a in b) break". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. Expected a reference on the left hand side of an enumeration statement."
+PASS Invalid: "function f() { for (++a in b) break }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. Expected a reference on the left hand side of an enumeration statement."
</ins><span class="cx"> PASS Valid: "for ((++a) in b) break" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for ((++a) in b) break }"
</span><del>-PASS Invalid: "for (a, b in c) break"
-PASS Invalid: "function f() { for (a, b in c) break }"
-PASS Invalid: "for (a,b in c ;;) break"
-PASS Invalid: "function f() { for (a,b in c ;;) break }"
</del><ins>+PASS Invalid: "for (a, b in c) break". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. Expected a reference on the left hand side of an enumeration statement."
+PASS Invalid: "function f() { for (a, b in c) break }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. Expected a reference on the left hand side of an enumeration statement."
+PASS Invalid: "for (a,b in c ;;) break". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. Expected a reference on the left hand side of an enumeration statement."
+PASS Invalid: "function f() { for (a,b in c ;;) break }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. Expected a reference on the left hand side of an enumeration statement."
</ins><span class="cx"> PASS Valid: "for (a,(b in c) ;;) break" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for (a,(b in c) ;;) break }"
</span><span class="cx"> PASS Valid: "for ((a, b) in c) break" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for ((a, b) in c) break }"
</span><del>-PASS Invalid: "for (a ? b : c in c) break"
-PASS Invalid: "function f() { for (a ? b : c in c) break }"
</del><ins>+PASS Invalid: "for (a ? b : c in c) break". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. Expected a reference on the left hand side of an enumeration statement."
+PASS Invalid: "function f() { for (a ? b : c in c) break }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. Expected a reference on the left hand side of an enumeration statement."
</ins><span class="cx"> PASS Valid: "for ((a ? b : c) in c) break" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for ((a ? b : c) in c) break }"
</span><span class="cx"> PASS Valid: "for (var a in b in c) break" with ReferenceError
</span><span class="lines">@@ -508,144 +508,144 @@
</span><span class="cx"> PASS Valid: "function f() { for (var a = 5 += 6 in b) break }"
</span><span class="cx"> PASS Valid: "for (var a = foo('should be hit') in b) break" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for (var a = foo('should be hit') in b) break }"
</span><del>-PASS Invalid: "for (var a += 5 in b) break"
-PASS Invalid: "function f() { for (var a += 5 in b) break }"
-PASS Invalid: "for (var a = in b) break"
-PASS Invalid: "function f() { for (var a = in b) break }"
-PASS Invalid: "for (var a, b in b) break"
-PASS Invalid: "function f() { for (var a, b in b) break }"
-PASS Invalid: "for (var a = -6, b in b) break"
-PASS Invalid: "function f() { for (var a = -6, b in b) break }"
-PASS Invalid: "for (var a, b = 8 in b) break"
-PASS Invalid: "function f() { for (var a, b = 8 in b) break }"
</del><ins>+PASS Invalid: "for (var a += 5 in b) break". Produced the following syntax error: "SyntaxError: Unexpected token '+='. Expected either 'in' or 'of' in enumeration syntax."
+PASS Invalid: "function f() { for (var a += 5 in b) break }". Produced the following syntax error: "SyntaxError: Unexpected token '+='. Expected either 'in' or 'of' in enumeration syntax."
+PASS Invalid: "for (var a = in b) break". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'"
+PASS Invalid: "function f() { for (var a = in b) break }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'"
+PASS Invalid: "for (var a, b in b) break". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. can only declare a single variable in an enumeration."
+PASS Invalid: "function f() { for (var a, b in b) break }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. can only declare a single variable in an enumeration."
+PASS Invalid: "for (var a = -6, b in b) break". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. can only declare a single variable in an enumeration."
+PASS Invalid: "function f() { for (var a = -6, b in b) break }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. can only declare a single variable in an enumeration."
+PASS Invalid: "for (var a, b = 8 in b) break". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. can only declare a single variable in an enumeration."
+PASS Invalid: "function f() { for (var a, b = 8 in b) break }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'. can only declare a single variable in an enumeration."
</ins><span class="cx"> PASS Valid: "for (var a = (b in c) in d) break" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for (var a = (b in c) in d) break }"
</span><del>-PASS Invalid: "for (var a = (b in c in d) break"
-PASS Invalid: "function f() { for (var a = (b in c in d) break }"
-PASS Invalid: "for (var (a) in b) { }"
-PASS Invalid: "function f() { for (var (a) in b) { } }"
</del><ins>+PASS Invalid: "for (var a = (b in c in d) break". Produced the following syntax error: "SyntaxError: Unexpected keyword 'break'. Expected either 'in' or 'of' in enumeration syntax."
+PASS Invalid: "function f() { for (var a = (b in c in d) break }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'break'. Expected either 'in' or 'of' in enumeration syntax."
+PASS Invalid: "for (var (a) in b) { }". Produced the following syntax error: "SyntaxError: Unexpected token '('. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "function f() { for (var (a) in b) { } }". Produced the following syntax error: "SyntaxError: Unexpected token '('. Expected a parameter pattern or a ')' in parameter list."
</ins><span class="cx"> PASS Valid: "for (var a = 7, b = c < d >= d ; f()[6]++ ; --i()[1]++ ) {}" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for (var a = 7, b = c < d >= d ; f()[6]++ ; --i()[1]++ ) {} }"
</span><del>-PASS Invalid: "for (var {a} = 20 in b) { }"
-PASS Invalid: "function f() { for (var {a} = 20 in b) { } }"
-PASS Invalid: "for (var {a} = 20 of b) { }"
-PASS Invalid: "function f() { for (var {a} = 20 of b) { } }"
-PASS Invalid: "for (var {a} = 20 in b) { }"
-PASS Invalid: "function f() { for (var {a} = 20 in b) { } }"
</del><ins>+PASS Invalid: "for (var {a} = 20 in b) { }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-in loop header."
+PASS Invalid: "function f() { for (var {a} = 20 in b) { } }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-in loop header."
+PASS Invalid: "for (var {a} = 20 of b) { }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "function f() { for (var {a} = 20 of b) { } }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "for (var {a} = 20 in b) { }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-in loop header."
+PASS Invalid: "function f() { for (var {a} = 20 in b) { } }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-in loop header."
</ins><span class="cx"> PASS Valid: "for (var i = 20 in b) { }" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for (var i = 20 in b) { } }"
</span><del>-PASS Invalid: "for (var i = 20 of b) { }"
-PASS Invalid: "function f() { for (var i = 20 of b) { } }"
-PASS Invalid: "for (var {i} = 20 of b) { }"
-PASS Invalid: "function f() { for (var {i} = 20 of b) { } }"
-PASS Invalid: "for (var [i] = 20 of b) { }"
-PASS Invalid: "function f() { for (var [i] = 20 of b) { } }"
-PASS Invalid: "for (let [i] = 20 of b) { }"
-PASS Invalid: "function f() { for (let [i] = 20 of b) { } }"
-PASS Invalid: "for (const [i] = 20 of b) { }"
-PASS Invalid: "function f() { for (const [i] = 20 of b) { } }"
-PASS Invalid: "for (const i = 20 of b) { }"
-PASS Invalid: "function f() { for (const i = 20 of b) { } }"
-PASS Invalid: "for (let i = 20 of b) { }"
-PASS Invalid: "function f() { for (let i = 20 of b) { } }"
-PASS Invalid: "for (let i = 20 in b) { }"
-PASS Invalid: "function f() { for (let i = 20 in b) { } }"
-PASS Invalid: "for (const i = 20 in b) { }"
-PASS Invalid: "function f() { for (const i = 20 in b) { } }"
-PASS Invalid: "for (const {i} = 20 in b) { }"
-PASS Invalid: "function f() { for (const {i} = 20 in b) { } }"
-PASS Invalid: "for (let {i} = 20 in b) { }"
-PASS Invalid: "function f() { for (let {i} = 20 in b) { } }"
</del><ins>+PASS Invalid: "for (var i = 20 of b) { }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "function f() { for (var i = 20 of b) { } }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "for (var {i} = 20 of b) { }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "function f() { for (var {i} = 20 of b) { } }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "for (var [i] = 20 of b) { }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "function f() { for (var [i] = 20 of b) { } }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "for (let [i] = 20 of b) { }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "function f() { for (let [i] = 20 of b) { } }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "for (const [i] = 20 of b) { }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "function f() { for (const [i] = 20 of b) { } }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "for (const i = 20 of b) { }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "function f() { for (const i = 20 of b) { } }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "for (let i = 20 of b) { }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "function f() { for (let i = 20 of b) { } }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "for (let i = 20 in b) { }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-in loop header."
+PASS Invalid: "function f() { for (let i = 20 in b) { } }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-in loop header."
+PASS Invalid: "for (const i = 20 in b) { }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-in loop header."
+PASS Invalid: "function f() { for (const i = 20 in b) { } }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-in loop header."
+PASS Invalid: "for (const {i} = 20 in b) { }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-in loop header."
+PASS Invalid: "function f() { for (const {i} = 20 in b) { } }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-in loop header."
+PASS Invalid: "for (let {i} = 20 in b) { }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-in loop header."
+PASS Invalid: "function f() { for (let {i} = 20 in b) { } }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-in loop header."
</ins><span class="cx"> try statement
</span><del>-PASS Invalid: "try { break } catch(e) {}"
-PASS Invalid: "function f() { try { break } catch(e) {} }"
</del><ins>+PASS Invalid: "try { break } catch(e) {}". Produced the following syntax error: "SyntaxError: 'break' is only valid inside a switch or loop statement."
+PASS Invalid: "function f() { try { break } catch(e) {} }". Produced the following syntax error: "SyntaxError: 'break' is only valid inside a switch or loop statement."
</ins><span class="cx"> PASS Valid: "try {} finally { c++ }" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { try {} finally { c++ } }"
</span><span class="cx"> PASS Valid: "try { with (x) { } } catch(e) {} finally { if (a) ; }"
</span><span class="cx"> PASS Valid: "function f() { try { with (x) { } } catch(e) {} finally { if (a) ; } }"
</span><del>-PASS Invalid: "try {}"
-PASS Invalid: "function f() { try {} }"
-PASS Invalid: "catch(e) {}"
-PASS Invalid: "function f() { catch(e) {} }"
-PASS Invalid: "finally {}"
-PASS Invalid: "function f() { finally {} }"
-PASS Invalid: "try a; catch(e) {}"
-PASS Invalid: "function f() { try a; catch(e) {} }"
-PASS Invalid: "try {} catch(e) a()"
-PASS Invalid: "function f() { try {} catch(e) a() }"
-PASS Invalid: "try {} finally a()"
-PASS Invalid: "function f() { try {} finally a() }"
-PASS Invalid: "try {} catch(e)"
-PASS Invalid: "function f() { try {} catch(e) }"
-PASS Invalid: "try {} finally"
-PASS Invalid: "function f() { try {} finally }"
-PASS Invalid: "try {} finally {} catch(e) {}"
-PASS Invalid: "function f() { try {} finally {} catch(e) {} }"
-PASS Invalid: "try {} catch (...) {}"
-PASS Invalid: "function f() { try {} catch (...) {} }"
-PASS Invalid: "try {} catch {}"
-PASS Invalid: "function f() { try {} catch {} }"
</del><ins>+PASS Invalid: "try {}". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { try {} }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Try statements must have at least a catch or finally block."
+PASS Invalid: "catch(e) {}". Produced the following syntax error: "SyntaxError: Unexpected keyword 'catch'"
+PASS Invalid: "function f() { catch(e) {} }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'catch'"
+PASS Invalid: "finally {}". Produced the following syntax error: "SyntaxError: Unexpected keyword 'finally'"
+PASS Invalid: "function f() { finally {} }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'finally'"
+PASS Invalid: "try a; catch(e) {}". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. Expected a block statement as body of a try statement."
+PASS Invalid: "function f() { try a; catch(e) {} }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. Expected a block statement as body of a try statement."
+PASS Invalid: "try {} catch(e) a()". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. Expected exception handler to be a block statement."
+PASS Invalid: "function f() { try {} catch(e) a() }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. Expected exception handler to be a block statement."
+PASS Invalid: "try {} finally a()". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. Expected block statement for finally body."
+PASS Invalid: "function f() { try {} finally a() }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. Expected block statement for finally body."
+PASS Invalid: "try {} catch(e)". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { try {} catch(e) }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected exception handler to be a block statement."
+PASS Invalid: "try {} finally". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { try {} finally }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected block statement for finally body."
+PASS Invalid: "try {} finally {} catch(e) {}". Produced the following syntax error: "SyntaxError: Unexpected keyword 'catch'"
+PASS Invalid: "function f() { try {} finally {} catch(e) {} }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'catch'"
+PASS Invalid: "try {} catch (...) {}". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "function f() { try {} catch (...) {} }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "try {} catch {}". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected '(' to start a 'catch' target."
+PASS Invalid: "function f() { try {} catch {} }". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected '(' to start a 'catch' target."
</ins><span class="cx"> PASS Valid: "if (a) try {} finally {} else b;"
</span><span class="cx"> PASS Valid: "function f() { if (a) try {} finally {} else b; }"
</span><span class="cx"> PASS Valid: "if (--a()) do with(1) try {} catch(ke) { f() ; g() } while (a in b) else {}" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { if (--a()) do with(1) try {} catch(ke) { f() ; g() } while (a in b) else {} }"
</span><del>-PASS Invalid: "if (a) try {} else b; catch (e) { }"
-PASS Invalid: "function f() { if (a) try {} else b; catch (e) { } }"
-PASS Invalid: "try { finally {}"
-PASS Invalid: "function f() { try { finally {} }"
</del><ins>+PASS Invalid: "if (a) try {} else b; catch (e) { }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'else'. Try statements must have at least a catch or finally block."
+PASS Invalid: "function f() { if (a) try {} else b; catch (e) { } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'else'. Try statements must have at least a catch or finally block."
+PASS Invalid: "try { finally {}". Produced the following syntax error: "SyntaxError: Unexpected keyword 'finally'"
+PASS Invalid: "function f() { try { finally {} }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'finally'"
</ins><span class="cx"> switch statement
</span><span class="cx"> PASS Valid: "switch (a) {}"
</span><span class="cx"> PASS Valid: "function f() { switch (a) {} }"
</span><del>-PASS Invalid: "switch () {}"
-PASS Invalid: "function f() { switch () {} }"
-PASS Invalid: "case 5:"
-PASS Invalid: "function f() { case 5: }"
-PASS Invalid: "default:"
-PASS Invalid: "function f() { default: }"
-PASS Invalid: "switch (a) b;"
-PASS Invalid: "function f() { switch (a) b; }"
-PASS Invalid: "switch (a) case 3: b;"
-PASS Invalid: "function f() { switch (a) case 3: b; }"
</del><ins>+PASS Invalid: "switch () {}". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { switch () {} }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "case 5:". Produced the following syntax error: "SyntaxError: Parser error"
+PASS Invalid: "function f() { case 5: }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'case'. Expected a closing '}' after a function body."
+PASS Invalid: "default:". Produced the following syntax error: "SyntaxError: Parser error"
+PASS Invalid: "function f() { default: }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'default'. Expected a closing '}' after a function body."
+PASS Invalid: "switch (a) b;". Produced the following syntax error: "SyntaxError: Unexpected identifier 'b'. Expected '{' to start a body of a 'switch'."
+PASS Invalid: "function f() { switch (a) b; }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'b'. Expected '{' to start a body of a 'switch'."
+PASS Invalid: "switch (a) case 3: b;". Produced the following syntax error: "SyntaxError: Unexpected keyword 'case'. Expected '{' to start a body of a 'switch'."
+PASS Invalid: "function f() { switch (a) case 3: b; }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'case'. Expected '{' to start a body of a 'switch'."
</ins><span class="cx"> PASS Valid: "switch (f()) { case 5 * f(): default: case '6' - 9: ++i }" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { switch (f()) { case 5 * f(): default: case '6' - 9: ++i } }"
</span><del>-PASS Invalid: "switch (true) { default: case 6: default: }"
-PASS Invalid: "function f() { switch (true) { default: case 6: default: } }"
-PASS Invalid: "switch (l) { f(); }"
-PASS Invalid: "function f() { switch (l) { f(); } }"
-PASS Invalid: "switch (l) { case 1: ; a: case 5: }"
-PASS Invalid: "function f() { switch (l) { case 1: ; a: case 5: } }"
</del><ins>+PASS Invalid: "switch (true) { default: case 6: default: }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'default'. Expected '}' to end a body of a 'switch'."
+PASS Invalid: "function f() { switch (true) { default: case 6: default: } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'default'. Expected '}' to end a body of a 'switch'."
+PASS Invalid: "switch (l) { f(); }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'f'. Expected '}' to end a body of a 'switch'."
+PASS Invalid: "function f() { switch (l) { f(); } }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'f'. Expected '}' to end a body of a 'switch'."
+PASS Invalid: "switch (l) { case 1: ; a: case 5: }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'case'. Cannot parse statement."
+PASS Invalid: "function f() { switch (l) { case 1: ; a: case 5: } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'case'. Cannot parse statement."
</ins><span class="cx"> PASS Valid: "switch (g() - h[5].l) { case 1 + 6: a: b: c: ++f }" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { switch (g() - h[5].l) { case 1 + 6: a: b: c: ++f } }"
</span><del>-PASS Invalid: "switch (g) { case 1: a: }"
-PASS Invalid: "function f() { switch (g) { case 1: a: } }"
-PASS Invalid: "switch (g) { case 1: a: default: }"
-PASS Invalid: "function f() { switch (g) { case 1: a: default: } }"
-PASS Invalid: "switch g { case 1: l() }"
-PASS Invalid: "function f() { switch g { case 1: l() } }"
-PASS Invalid: "switch (g) { case 1:"
-PASS Invalid: "function f() { switch (g) { case 1: }"
</del><ins>+PASS Invalid: "switch (g) { case 1: a: }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Cannot parse statement."
+PASS Invalid: "function f() { switch (g) { case 1: a: } }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Cannot parse statement."
+PASS Invalid: "switch (g) { case 1: a: default: }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'default'. Cannot parse statement."
+PASS Invalid: "function f() { switch (g) { case 1: a: default: } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'default'. Cannot parse statement."
+PASS Invalid: "switch g { case 1: l() }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'g'. Expected '(' to start a subject of a 'switch'."
+PASS Invalid: "function f() { switch g { case 1: l() } }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'g'. Expected '(' to start a subject of a 'switch'."
+PASS Invalid: "switch (g) { case 1:". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { switch (g) { case 1: }". Produced the following syntax error: "SyntaxError: Unexpected end of script"
</ins><span class="cx"> PASS Valid: "switch (l) { case a = b ? c : d : }" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { switch (l) { case a = b ? c : d : } }"
</span><span class="cx"> PASS Valid: "switch (sw) { case a ? b - 7[1] ? [c,,] : d = 6 : { } : }" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { switch (sw) { case a ? b - 7[1] ? [c,,] : d = 6 : { } : } }"
</span><del>-PASS Invalid: "switch (l) { case b ? c : }"
-PASS Invalid: "function f() { switch (l) { case b ? c : } }"
</del><ins>+PASS Invalid: "switch (l) { case b ? c : }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "function f() { switch (l) { case b ? c : } }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
</ins><span class="cx"> PASS Valid: "switch (l) { case 1: a: with(g) switch (g) { case 2: default: } default: }" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { switch (l) { case 1: a: with(g) switch (g) { case 2: default: } default: } }"
</span><del>-PASS Invalid: "switch (4 - ) { }"
-PASS Invalid: "function f() { switch (4 - ) { } }"
-PASS Invalid: "switch (l) { default case: 5; }"
-PASS Invalid: "function f() { switch (l) { default case: 5; } }"
-PASS Invalid: "L: L: ;"
-PASS Invalid: "function f() { L: L: ; }"
-PASS Invalid: "L: L1: L: ;"
-PASS Invalid: "function f() { L: L1: L: ; }"
-PASS Invalid: "L: L1: L2: L3: L4: L: ;"
-PASS Invalid: "function f() { L: L1: L2: L3: L4: L: ; }"
-PASS Invalid: "for(var a,b 'this shouldn't be allowed' false ; ) ;"
-PASS Invalid: "function f() { for(var a,b 'this shouldn't be allowed' false ; ) ; }"
-PASS Invalid: "for(var a,b '"
-PASS Invalid: "function f() { for(var a,b ' }"
</del><ins>+PASS Invalid: "switch (4 - ) { }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { switch (4 - ) { } }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "switch (l) { default case: 5; }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'case'. Expected a ':' after switch default clause."
+PASS Invalid: "function f() { switch (l) { default case: 5; } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'case'. Expected a ':' after switch default clause."
+PASS Invalid: "L: L: ;". Produced the following syntax error: "SyntaxError: Unexpected token ';'. Attempted to redeclare the label 'L'."
+PASS Invalid: "function f() { L: L: ; }". Produced the following syntax error: "SyntaxError: Unexpected token ';'. Attempted to redeclare the label 'L'."
+PASS Invalid: "L: L1: L: ;". Produced the following syntax error: "SyntaxError: Unexpected token ';'. Attempted to redeclare the label 'L'."
+PASS Invalid: "function f() { L: L1: L: ; }". Produced the following syntax error: "SyntaxError: Unexpected token ';'. Attempted to redeclare the label 'L'."
+PASS Invalid: "L: L1: L2: L3: L4: L: ;". Produced the following syntax error: "SyntaxError: Unexpected token ';'. Attempted to redeclare the label 'L'."
+PASS Invalid: "function f() { L: L1: L2: L3: L4: L: ; }". Produced the following syntax error: "SyntaxError: Unexpected token ';'. Attempted to redeclare the label 'L'."
+PASS Invalid: "for(var a,b 'this shouldn't be allowed' false ; ) ;". Produced the following syntax error: "SyntaxError: Unexpected string literal 'this shouldn'. can only declare a single variable in an enumeration."
+PASS Invalid: "function f() { for(var a,b 'this shouldn't be allowed' false ; ) ; }". Produced the following syntax error: "SyntaxError: Unexpected string literal 'this shouldn'. can only declare a single variable in an enumeration."
+PASS Invalid: "for(var a,b '". Produced the following syntax error: "SyntaxError: Unexpected EOF"
+PASS Invalid: "function f() { for(var a,b ' }". Produced the following syntax error: "SyntaxError: Unexpected EOF"
</ins><span class="cx"> PASS Valid: "function __proto__(){}"
</span><span class="cx"> PASS Valid: "function f() { function __proto__(){} }"
</span><span class="cx"> PASS Valid: "(function __proto__(){})"
</span><span class="lines">@@ -664,18 +664,18 @@
</span><span class="cx"> PASS Valid: "function f() { 'use strict'; function f1(a) { function f2(b) { if (b) { function f3(c) { return c; } return f3(b); } else return b; } return f2(a); } f1(5); }"
</span><span class="cx"> PASS Valid: "'use strict'; function f1(a) {}; function f1(a) {};"
</span><span class="cx"> PASS Valid: "function f() { 'use strict'; function f1(a) {}; function f1(a) {}; }"
</span><del>-PASS Invalid: "'use strict'; { function f1(a) {}; function f1(a) {}; }"
-PASS Invalid: "function f() { 'use strict'; { function f1(a) {}; function f1(a) {}; } }"
-PASS Invalid: "'use strict'; { let f1; function f1(a) {}; }"
-PASS Invalid: "function f() { 'use strict'; { let f1; function f1(a) {}; } }"
-PASS Invalid: "'use strict'; { function f1(a) {}; let f1; }"
-PASS Invalid: "function f() { 'use strict'; { function f1(a) {}; let f1; } }"
-PASS Invalid: "'use strict'; let f1; function f1(a) {};"
-PASS Invalid: "function f() { 'use strict'; let f1; function f1(a) {}; }"
-PASS Invalid: "'use strict'; function f1(a) {}; let f1; "
-PASS Invalid: "function f() { 'use strict'; function f1(a) {}; let f1; }"
-PASS Invalid: "let f1; function f1(a) {};"
-PASS Invalid: "function f() { let f1; function f1(a) {}; }"
</del><ins>+PASS Invalid: "'use strict'; { function f1(a) {}; function f1(a) {}; }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'f1' in strict mode."
+PASS Invalid: "function f() { 'use strict'; { function f1(a) {}; function f1(a) {}; } }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'f1' in strict mode."
+PASS Invalid: "'use strict'; { let f1; function f1(a) {}; }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'f1' in strict mode."
+PASS Invalid: "function f() { 'use strict'; { let f1; function f1(a) {}; } }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'f1' in strict mode."
+PASS Invalid: "'use strict'; { function f1(a) {}; let f1; }". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'f1'."
+PASS Invalid: "function f() { 'use strict'; { function f1(a) {}; let f1; } }". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'f1'."
+PASS Invalid: "'use strict'; let f1; function f1(a) {};". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'f1' in strict mode."
+PASS Invalid: "function f() { 'use strict'; let f1; function f1(a) {}; }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'f1' in strict mode."
+PASS Invalid: "'use strict'; function f1(a) {}; let f1; ". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'f1'."
+PASS Invalid: "function f() { 'use strict'; function f1(a) {}; let f1; }". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'f1'."
+PASS Invalid: "let f1; function f1(a) {};". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'f1' in strict mode."
+PASS Invalid: "function f() { let f1; function f1(a) {}; }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'f1' in strict mode."
</ins><span class="cx"> PASS Valid: "function foo() { let f1; { function f1(a) {}; } }"
</span><span class="cx"> PASS Valid: "function f() { function foo() { let f1; { function f1(a) {}; } } }"
</span><span class="cx"> PASS Valid: "function foo() { { function f1(a) {}; } let f1; }"
</span><span class="lines">@@ -682,100 +682,100 @@
</span><span class="cx"> PASS Valid: "function f() { function foo() { { function f1(a) {}; } let f1; } }"
</span><span class="cx"> PASS Valid: "function foo() { { function foo() { }; function foo() { } } }"
</span><span class="cx"> PASS Valid: "function f() { function foo() { { function foo() { }; function foo() { } } } }"
</span><del>-PASS Invalid: "function foo() { 'use strict'; { function foo() { }; function foo() { } } }"
-PASS Invalid: "function f() { function foo() { 'use strict'; { function foo() { }; function foo() { } } } }"
-PASS Invalid: "function foo() { let f1; function f1(a) {}; }"
-PASS Invalid: "function f() { function foo() { let f1; function f1(a) {}; } }"
-PASS Invalid: "let f1; function f1(a) {};"
-PASS Invalid: "function f() { let f1; function f1(a) {}; }"
</del><ins>+PASS Invalid: "function foo() { 'use strict'; { function foo() { }; function foo() { } } }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'foo' in strict mode."
+PASS Invalid: "function f() { function foo() { 'use strict'; { function foo() { }; function foo() { } } } }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'foo' in strict mode."
+PASS Invalid: "function foo() { let f1; function f1(a) {}; }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'f1' in strict mode."
+PASS Invalid: "function f() { function foo() { let f1; function f1(a) {}; } }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'f1' in strict mode."
+PASS Invalid: "let f1; function f1(a) {};". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'f1' in strict mode."
+PASS Invalid: "function f() { let f1; function f1(a) {}; }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'f1' in strict mode."
</ins><span class="cx"> PASS Valid: "{ function f1(a) {}; let f1; }"
</span><del>-PASS Invalid: "function f() { { function f1(a) {}; let f1; } }"
</del><ins>+PASS Invalid: "function f() { { function f1(a) {}; let f1; } }". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'f1'."
</ins><span class="cx"> PASS Valid: "{ function f1(a) {}; const f1 = 25; }"
</span><del>-PASS Invalid: "function f() { { function f1(a) {}; const f1 = 25; } }"
</del><ins>+PASS Invalid: "function f() { { function f1(a) {}; const f1 = 25; } }". Produced the following syntax error: "SyntaxError: Cannot declare a const variable twice: 'f1'."
</ins><span class="cx"> PASS Valid: "{ function f1(a) {}; class f1{}; }"
</span><del>-PASS Invalid: "function f() { { function f1(a) {}; class f1{}; } }"
-PASS Invalid: "function foo() { { let bar; function bar() { } } }"
-PASS Invalid: "function f() { function foo() { { let bar; function bar() { } } } }"
-PASS Invalid: "function foo() { { function bar() { }; let bar; } }"
-PASS Invalid: "function f() { function foo() { { function bar() { }; let bar; } } }"
-PASS Invalid: "function foo() { { const bar; function bar() { } } }"
-PASS Invalid: "function f() { function foo() { { const bar; function bar() { } } } }"
-PASS Invalid: "function foo() { { function bar() { }; const bar; } }"
-PASS Invalid: "function f() { function foo() { { function bar() { }; const bar; } } }"
-PASS Invalid: "function foo() { { class bar{}; function bar() { } } }"
-PASS Invalid: "function f() { function foo() { { class bar{}; function bar() { } } } }"
-PASS Invalid: "function foo() { { function bar() { }; class bar{}; } }"
-PASS Invalid: "function f() { function foo() { { function bar() { }; class bar{}; } } }"
</del><ins>+PASS Invalid: "function f() { { function f1(a) {}; class f1{}; } }". Produced the following syntax error: "SyntaxError: Cannot declare a class twice: 'f1'."
+PASS Invalid: "function foo() { { let bar; function bar() { } } }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'bar' in strict mode."
+PASS Invalid: "function f() { function foo() { { let bar; function bar() { } } } }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'bar' in strict mode."
+PASS Invalid: "function foo() { { function bar() { }; let bar; } }". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'bar'."
+PASS Invalid: "function f() { function foo() { { function bar() { }; let bar; } } }". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'bar'."
+PASS Invalid: "function foo() { { const bar; function bar() { } } }". Produced the following syntax error: "SyntaxError: Unexpected token ';'. const declared variable 'bar' must have an initializer."
+PASS Invalid: "function f() { function foo() { { const bar; function bar() { } } } }". Produced the following syntax error: "SyntaxError: Unexpected token ';'. const declared variable 'bar' must have an initializer."
+PASS Invalid: "function foo() { { function bar() { }; const bar; } }". Produced the following syntax error: "SyntaxError: Cannot declare a const variable twice: 'bar'."
+PASS Invalid: "function f() { function foo() { { function bar() { }; const bar; } } }". Produced the following syntax error: "SyntaxError: Cannot declare a const variable twice: 'bar'."
+PASS Invalid: "function foo() { { class bar{}; function bar() { } } }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'bar' in strict mode."
+PASS Invalid: "function f() { function foo() { { class bar{}; function bar() { } } } }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'bar' in strict mode."
+PASS Invalid: "function foo() { { function bar() { }; class bar{}; } }". Produced the following syntax error: "SyntaxError: Cannot declare a class twice: 'bar'."
+PASS Invalid: "function f() { function foo() { { function bar() { }; class bar{}; } } }". Produced the following syntax error: "SyntaxError: Cannot declare a class twice: 'bar'."
</ins><span class="cx"> PASS Valid: "switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; }"
</span><span class="cx"> PASS Valid: "function f() { switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; } }"
</span><span class="cx"> PASS Valid: "switch('foo') { case 1: let foo; function foo() {}; break; case 2: function foo() {}; break; }"
</span><del>-PASS Invalid: "function f() { switch('foo') { case 1: let foo; function foo() {}; break; case 2: function foo() {}; break; } }"
</del><ins>+PASS Invalid: "function f() { switch('foo') { case 1: let foo; function foo() {}; break; case 2: function foo() {}; break; } }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'foo' in strict mode."
</ins><span class="cx"> PASS Valid: "switch('foo') { case 1: function foo() {}; let foo; break; case 2: function foo() {}; break; }"
</span><del>-PASS Invalid: "function f() { switch('foo') { case 1: function foo() {}; let foo; break; case 2: function foo() {}; break; } }"
</del><ins>+PASS Invalid: "function f() { switch('foo') { case 1: function foo() {}; let foo; break; case 2: function foo() {}; break; } }". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'foo'."
</ins><span class="cx"> PASS Valid: "switch('foo') { case 1: function foo() {}; const foo = 25; break; case 2: function foo() {}; break; }"
</span><del>-PASS Invalid: "function f() { switch('foo') { case 1: function foo() {}; const foo = 25; break; case 2: function foo() {}; break; } }"
</del><ins>+PASS Invalid: "function f() { switch('foo') { case 1: function foo() {}; const foo = 25; break; case 2: function foo() {}; break; } }". Produced the following syntax error: "SyntaxError: Cannot declare a const variable twice: 'foo'."
</ins><span class="cx"> PASS Valid: "switch('foo') { case 1: function foo() {}; class foo {} ; break; case 2: function foo() {}; break; }"
</span><del>-PASS Invalid: "function f() { switch('foo') { case 1: function foo() {}; class foo {} ; break; case 2: function foo() {}; break; } }"
</del><ins>+PASS Invalid: "function f() { switch('foo') { case 1: function foo() {}; class foo {} ; break; case 2: function foo() {}; break; } }". Produced the following syntax error: "SyntaxError: Cannot declare a class twice: 'foo'."
</ins><span class="cx"> PASS Valid: "switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; case 3: let foo; }"
</span><del>-PASS Invalid: "function f() { switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; case 3: let foo; } }"
</del><ins>+PASS Invalid: "function f() { switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; case 3: let foo; } }". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'foo'."
</ins><span class="cx"> PASS Valid: "function foo() { switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; case 3: { let foo; } } }"
</span><span class="cx"> PASS Valid: "function f() { function foo() { switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; case 3: { let foo; } } } }"
</span><del>-PASS Invalid: "'use strict'; switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; }"
-PASS Invalid: "function f() { 'use strict'; switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; } }"
-PASS Invalid: "'use strict'; switch('foo') { case 1: function foo() {}; break; case 2: let foo; break; }"
-PASS Invalid: "function f() { 'use strict'; switch('foo') { case 1: function foo() {}; break; case 2: let foo; break; } }"
-PASS Invalid: "'use strict'; switch('foo') { case 1: let foo; break; case 2: function foo() {}; break; }"
-PASS Invalid: "function f() { 'use strict'; switch('foo') { case 1: let foo; break; case 2: function foo() {}; break; } }"
</del><ins>+PASS Invalid: "'use strict'; switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'foo' in strict mode."
+PASS Invalid: "function f() { 'use strict'; switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; } }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'foo' in strict mode."
+PASS Invalid: "'use strict'; switch('foo') { case 1: function foo() {}; break; case 2: let foo; break; }". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'foo'."
+PASS Invalid: "function f() { 'use strict'; switch('foo') { case 1: function foo() {}; break; case 2: let foo; break; } }". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'foo'."
+PASS Invalid: "'use strict'; switch('foo') { case 1: let foo; break; case 2: function foo() {}; break; }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'foo' in strict mode."
+PASS Invalid: "function f() { 'use strict'; switch('foo') { case 1: let foo; break; case 2: function foo() {}; break; } }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'foo' in strict mode."
</ins><span class="cx"> PASS Valid: "'use strict'; switch('foo') { case 1: { let foo; break; } case 2: function foo() {}; break; }"
</span><span class="cx"> PASS Valid: "function f() { 'use strict'; switch('foo') { case 1: { let foo; break; } case 2: function foo() {}; break; } }"
</span><span class="cx"> PASS Valid: "'use strict'; switch('foo') { case 1: { function foo() { }; break; } case 2: function foo() {}; break; }"
</span><span class="cx"> PASS Valid: "function f() { 'use strict'; switch('foo') { case 1: { function foo() { }; break; } case 2: function foo() {}; break; } }"
</span><del>-PASS Invalid: "'use strict'; if (true) function foo() { }; "
-PASS Invalid: "function f() { 'use strict'; if (true) function foo() { }; }"
</del><ins>+PASS Invalid: "'use strict'; if (true) function foo() { }; ". Produced the following syntax error: "SyntaxError: Function declarations are only allowed inside blocks or switch statements in strict mode."
+PASS Invalid: "function f() { 'use strict'; if (true) function foo() { }; }". Produced the following syntax error: "SyntaxError: Function declarations are only allowed inside blocks or switch statements in strict mode."
</ins><span class="cx"> PASS Valid: "if (true) function foo() { }; "
</span><span class="cx"> PASS Valid: "function f() { if (true) function foo() { }; }"
</span><del>-PASS Invalid: " let foo; if (true) function foo() { };"
</del><ins>+PASS Invalid: " let foo; if (true) function foo() { };". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'foo' in strict mode."
</ins><span class="cx"> PASS Valid: "function f() { let foo; if (true) function foo() { }; }"
</span><span class="cx"> PASS Valid: "function baz() { let foo; if (true) function foo() { }; }"
</span><span class="cx"> PASS Valid: "function f() { function baz() { let foo; if (true) function foo() { }; } }"
</span><del>-PASS Invalid: "if (true) function foo() { }; let foo;"
</del><ins>+PASS Invalid: "if (true) function foo() { }; let foo;". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'foo'."
</ins><span class="cx"> PASS Valid: "function f() { if (true) function foo() { }; let foo; }"
</span><del>-PASS Invalid: "{ if (true) function foo() { }; } let foo;"
</del><ins>+PASS Invalid: "{ if (true) function foo() { }; } let foo;". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'foo'."
</ins><span class="cx"> PASS Valid: "function f() { { if (true) function foo() { }; } let foo; }"
</span><del>-PASS Invalid: "let foo; while (false) function foo() { }; "
-PASS Invalid: "function f() { let foo; while (false) function foo() { }; }"
-PASS Invalid: "let foo; { while (false) function foo() { }; } "
-PASS Invalid: "function f() { let foo; { while (false) function foo() { }; } }"
-PASS Invalid: "while (false) function foo() { }; let foo;"
-PASS Invalid: "function f() { while (false) function foo() { }; let foo; }"
-PASS Invalid: "let foo; while (false) label: function foo() { }; "
-PASS Invalid: "function f() { let foo; while (false) label: function foo() { }; }"
-PASS Invalid: "while (false) label: function foo() { }; let foo;"
-PASS Invalid: "function f() { while (false) label: function foo() { }; let foo; }"
-PASS Invalid: "'use strict'; while (false) function foo() { }; "
-PASS Invalid: "function f() { 'use strict'; while (false) function foo() { }; }"
-PASS Invalid: "'use strict'; if (false) function foo() { }; "
-PASS Invalid: "function f() { 'use strict'; if (false) function foo() { }; }"
-PASS Invalid: "'use strict'; do function foo() { } while (false); "
-PASS Invalid: "function f() { 'use strict'; do function foo() { } while (false); }"
-PASS Invalid: "while (false) function foo() { }; "
-PASS Invalid: "function f() { while (false) function foo() { }; }"
</del><ins>+PASS Invalid: "let foo; while (false) function foo() { }; ". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "function f() { let foo; while (false) function foo() { }; }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "let foo; { while (false) function foo() { }; } ". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "function f() { let foo; { while (false) function foo() { }; } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "while (false) function foo() { }; let foo;". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "function f() { while (false) function foo() { }; let foo; }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "let foo; while (false) label: function foo() { }; ". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "function f() { let foo; while (false) label: function foo() { }; }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "while (false) label: function foo() { }; let foo;". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "function f() { while (false) label: function foo() { }; let foo; }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "'use strict'; while (false) function foo() { }; ". Produced the following syntax error: "SyntaxError: Function declarations are only allowed inside blocks or switch statements in strict mode."
+PASS Invalid: "function f() { 'use strict'; while (false) function foo() { }; }". Produced the following syntax error: "SyntaxError: Function declarations are only allowed inside blocks or switch statements in strict mode."
+PASS Invalid: "'use strict'; if (false) function foo() { }; ". Produced the following syntax error: "SyntaxError: Function declarations are only allowed inside blocks or switch statements in strict mode."
+PASS Invalid: "function f() { 'use strict'; if (false) function foo() { }; }". Produced the following syntax error: "SyntaxError: Function declarations are only allowed inside blocks or switch statements in strict mode."
+PASS Invalid: "'use strict'; do function foo() { } while (false); ". Produced the following syntax error: "SyntaxError: Function declarations are only allowed inside blocks or switch statements in strict mode."
+PASS Invalid: "function f() { 'use strict'; do function foo() { } while (false); }". Produced the following syntax error: "SyntaxError: Function declarations are only allowed inside blocks or switch statements in strict mode."
+PASS Invalid: "while (false) function foo() { }; ". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "function f() { while (false) function foo() { }; }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
</ins><span class="cx"> PASS Valid: "if (false) function foo() { }; "
</span><span class="cx"> PASS Valid: "function f() { if (false) function foo() { }; }"
</span><del>-PASS Invalid: "do function foo() { } while (false); "
-PASS Invalid: "function f() { do function foo() { } while (false); }"
-PASS Invalid: "if (cond) label: function foo() { }"
-PASS Invalid: "function f() { if (cond) label: function foo() { } }"
-PASS Invalid: "while (true) { while (true) function bar() { } }"
-PASS Invalid: "function f() { while (true) { while (true) function bar() { } } }"
-PASS Invalid: "with ({}) function bar() { }"
-PASS Invalid: "function f() { with ({}) function bar() { } }"
</del><ins>+PASS Invalid: "do function foo() { } while (false); ". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "function f() { do function foo() { } while (false); }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "if (cond) label: function foo() { }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "function f() { if (cond) label: function foo() { } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "while (true) { while (true) function bar() { } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "function f() { while (true) { while (true) function bar() { } } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "with ({}) function bar() { }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "function f() { with ({}) function bar() { } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
</ins><span class="cx"> PASS Valid: "function bar() { label: function baz() { } }"
</span><span class="cx"> PASS Valid: "function f() { function bar() { label: function baz() { } } }"
</span><span class="cx"> PASS Valid: "function bar() { let: function baz() { } }"
</span><span class="cx"> PASS Valid: "function f() { function bar() { let: function baz() { } } }"
</span><del>-PASS Invalid: "function bar() { 'use strict'; let: function baz() { } }"
-PASS Invalid: "function f() { function bar() { 'use strict'; let: function baz() { } } }"
</del><ins>+PASS Invalid: "function bar() { 'use strict'; let: function baz() { } }". Produced the following syntax error: "SyntaxError: Unexpected token ':'. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "function f() { function bar() { 'use strict'; let: function baz() { } } }". Produced the following syntax error: "SyntaxError: Unexpected token ':'. Expected a parameter pattern or a ')' in parameter list."
</ins><span class="cx"> PASS Valid: "function bar() { yield: function baz() { } }"
</span><span class="cx"> PASS Valid: "function f() { function bar() { yield: function baz() { } } }"
</span><span class="cx"> PASS Valid: "function bar() { label: label2: function baz() { } }"
</span><span class="lines">@@ -782,16 +782,16 @@
</span><span class="cx"> PASS Valid: "function f() { function bar() { label: label2: function baz() { } } }"
</span><span class="cx"> PASS Valid: "function bar() { label: label2: label3: function baz() { } }"
</span><span class="cx"> PASS Valid: "function f() { function bar() { label: label2: label3: function baz() { } } }"
</span><del>-PASS Invalid: "function bar() { label: label2: label weird: function baz() { } }"
-PASS Invalid: "function f() { function bar() { label: label2: label weird: function baz() { } } }"
</del><ins>+PASS Invalid: "function bar() { label: label2: label weird: function baz() { } }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'weird'"
+PASS Invalid: "function f() { function bar() { label: label2: label weird: function baz() { } } }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'weird'"
</ins><span class="cx"> PASS Valid: "function bar() { label: label2: label3: function baz() { } }"
</span><span class="cx"> PASS Valid: "function f() { function bar() { label: label2: label3: function baz() { } } }"
</span><del>-PASS Invalid: "function bar() { 'use strict'; label: label2: label 3: function baz() { } }"
-PASS Invalid: "function f() { function bar() { 'use strict'; label: label2: label 3: function baz() { } } }"
-PASS Invalid: "function bar() { if (cond) label: function foo() { } }"
-PASS Invalid: "function f() { function bar() { if (cond) label: function foo() { } } }"
-PASS Invalid: "function bar() { while (cond) label: function foo() { } }"
-PASS Invalid: "function f() { function bar() { while (cond) label: function foo() { } } }"
</del><ins>+PASS Invalid: "function bar() { 'use strict'; label: label2: label 3: function baz() { } }". Produced the following syntax error: "SyntaxError: Unexpected number '3'"
+PASS Invalid: "function f() { function bar() { 'use strict'; label: label2: label 3: function baz() { } } }". Produced the following syntax error: "SyntaxError: Unexpected number '3'"
+PASS Invalid: "function bar() { if (cond) label: function foo() { } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "function f() { function bar() { if (cond) label: function foo() { } } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "function bar() { while (cond) label: function foo() { } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
+PASS Invalid: "function f() { function bar() { while (cond) label: function foo() { } } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
</ins><span class="cx"> PASS Valid: "label: function foo() { }"
</span><span class="cx"> PASS Valid: "function f() { label: function foo() { } }"
</span><span class="cx"> PASS Valid: "let: function foo() { }"
</span><span class="lines">@@ -800,8 +800,8 @@
</span><span class="cx"> PASS Valid: "function f() { yield: function foo() { } }"
</span><span class="cx"> PASS Valid: "yield: let: function foo() { }"
</span><span class="cx"> PASS Valid: "function f() { yield: let: function foo() { } }"
</span><del>-PASS Invalid: "'use strict'; yield: let: function foo() { }"
-PASS Invalid: "function f() { 'use strict'; yield: let: function foo() { } }"
</del><ins>+PASS Invalid: "'use strict'; yield: let: function foo() { }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'"
+PASS Invalid: "function f() { 'use strict'; yield: let: function foo() { } }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'"
</ins><span class="cx"> PASS Valid: "var str = "'use strict'; function f1(a) { function f2(b) { return b; } return f2(a); } return f1(arguments[0]);"; var foo = new Function(str); foo(5);"
</span><span class="cx"> PASS Valid: "function f() { var str = "'use strict'; function f1(a) { function f2(b) { return b; } return f2(a); } return f1(arguments[0]);"; var foo = new Function(str); foo(5); }"
</span><span class="cx"> PASS Valid: "var str = "'use strict'; function f1(a) { function f2(b) { function f3(c) { return c; } return f3(b); } return f2(a); } return f1(arguments[0]);"; var foo = new Function(str); foo(5);"
</span><span class="lines">@@ -836,10 +836,10 @@
</span><span class="cx"> PASS Valid: "function f() { ([1 || 1].a = 1) }"
</span><span class="cx"> PASS Valid: "({a: 1 || 1}.a = 1)"
</span><span class="cx"> PASS Valid: "function f() { ({a: 1 || 1}.a = 1) }"
</span><del>-PASS Invalid: "var a.b = c"
-PASS Invalid: "function f() { var a.b = c }"
-PASS Invalid: "var a.b;"
-PASS Invalid: "function f() { var a.b; }"
</del><ins>+PASS Invalid: "var a.b = c". Produced the following syntax error: "SyntaxError: Unexpected token '.'. Expected ';' after variable declaration."
+PASS Invalid: "function f() { var a.b = c }". Produced the following syntax error: "SyntaxError: Unexpected token '.'. Expected ';' after variable declaration."
+PASS Invalid: "var a.b;". Produced the following syntax error: "SyntaxError: Unexpected token '.'. Expected ';' after variable declaration."
+PASS Invalid: "function f() { var a.b; }". Produced the following syntax error: "SyntaxError: Unexpected token '.'. Expected ';' after variable declaration."
</ins><span class="cx"> PASS Valid: "for (of of of){}" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for (of of of){} }"
</span><span class="cx"> PASS Valid: "for (of; of; of){}" with ReferenceError
</span><span class="lines">@@ -848,10 +848,10 @@
</span><span class="cx"> PASS Valid: "function f() { for (var of of of){} }"
</span><span class="cx"> PASS Valid: "for (var of; of; of){}"
</span><span class="cx"> PASS Valid: "function f() { for (var of; of; of){} }"
</span><del>-PASS Invalid: "for (var of.of of of){}"
-PASS Invalid: "function f() { for (var of.of of of){} }"
-PASS Invalid: "for (var of[of] of of){}"
-PASS Invalid: "function f() { for (var of[of] of of){} }"
</del><ins>+PASS Invalid: "for (var of.of of of){}". Produced the following syntax error: "SyntaxError: Unexpected token '.'. Expected either 'in' or 'of' in enumeration syntax."
+PASS Invalid: "function f() { for (var of.of of of){} }". Produced the following syntax error: "SyntaxError: Unexpected token '.'. Expected either 'in' or 'of' in enumeration syntax."
+PASS Invalid: "for (var of[of] of of){}". Produced the following syntax error: "SyntaxError: Unexpected token '['. Expected either 'in' or 'of' in enumeration syntax."
+PASS Invalid: "function f() { for (var of[of] of of){} }". Produced the following syntax error: "SyntaxError: Unexpected token '['. Expected either 'in' or 'of' in enumeration syntax."
</ins><span class="cx"> PASS Valid: "for (of.of of of){}" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for (of.of of of){} }"
</span><span class="cx"> PASS Valid: "for (of[of] of of){}" with ReferenceError
</span><span class="lines">@@ -864,14 +864,14 @@
</span><span class="cx"> PASS Valid: "function f() { for (of in of){} }"
</span><span class="cx"> PASS Valid: "for (var of in of){}"
</span><span class="cx"> PASS Valid: "function f() { for (var of in of){} }"
</span><del>-PASS Invalid: "for (var of.of in of){}"
-PASS Invalid: "function f() { for (var of.of in of){} }"
</del><ins>+PASS Invalid: "for (var of.of in of){}". Produced the following syntax error: "SyntaxError: Unexpected token '.'. Expected either 'in' or 'of' in enumeration syntax."
+PASS Invalid: "function f() { for (var of.of in of){} }". Produced the following syntax error: "SyntaxError: Unexpected token '.'. Expected either 'in' or 'of' in enumeration syntax."
</ins><span class="cx"> PASS Valid: "for (of.of in of){}" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for (of.of in of){} }"
</span><span class="cx"> PASS Valid: "for (of[of] in of){}" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for (of[of] in of){} }"
</span><del>-PASS Invalid: "for (var of[of] in of){}"
-PASS Invalid: "function f() { for (var of[of] in of){} }"
</del><ins>+PASS Invalid: "for (var of[of] in of){}". Produced the following syntax error: "SyntaxError: Unexpected token '['. Expected either 'in' or 'of' in enumeration syntax."
+PASS Invalid: "function f() { for (var of[of] in of){} }". Produced the following syntax error: "SyntaxError: Unexpected token '['. Expected either 'in' or 'of' in enumeration syntax."
</ins><span class="cx"> PASS Valid: "for (var [of] in of){}"
</span><span class="cx"> PASS Valid: "function f() { for (var [of] in of){} }"
</span><span class="cx"> PASS Valid: "for (var {of} in of){}"
</span><span class="lines">@@ -880,28 +880,28 @@
</span><span class="cx"> PASS Valid: "function f() { for ([of] in of){} }"
</span><span class="cx"> PASS Valid: "for ({of} in of){}" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { for ({of} in of){} }"
</span><del>-PASS Invalid: "for (var of = x of of){}"
-PASS Invalid: "function f() { for (var of = x of of){} }"
-PASS Invalid: "for (var {of} = x of of){}"
-PASS Invalid: "function f() { for (var {of} = x of of){} }"
-PASS Invalid: "for (var [of] = x of of){}"
-PASS Invalid: "function f() { for (var [of] = x of of){} }"
-PASS Invalid: "for (of of of of){}"
-PASS Invalid: "function f() { for (of of of of){} }"
-PASS Invalid: "for (of of; of; of){}"
-PASS Invalid: "function f() { for (of of; of; of){} }"
-PASS Invalid: "for (of of []; of; of){}"
-PASS Invalid: "function f() { for (of of []; of; of){} }"
-PASS Invalid: "for (of of){}"
-PASS Invalid: "function f() { for (of of){} }"
-PASS Invalid: "for (var of of){}"
-PASS Invalid: "function f() { for (var of of){} }"
-PASS Invalid: "for (of of in of){}"
-PASS Invalid: "function f() { for (of of in of){} }"
-PASS Invalid: "for (of in){}"
-PASS Invalid: "function f() { for (of in){} }"
-PASS Invalid: "for (var of in){}"
-PASS Invalid: "function f() { for (var of in){} }"
</del><ins>+PASS Invalid: "for (var of = x of of){}". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "function f() { for (var of = x of of){} }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "for (var {of} = x of of){}". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "function f() { for (var {of} = x of of){} }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "for (var [of] = x of of){}". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "function f() { for (var [of] = x of of){} }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header."
+PASS Invalid: "for (of of of of){}". Produced the following syntax error: "SyntaxError: Unexpected identifier 'of'. Expected ')' to end a for-of header."
+PASS Invalid: "function f() { for (of of of of){} }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'of'. Expected ')' to end a for-of header."
+PASS Invalid: "for (of of; of; of){}". Produced the following syntax error: "SyntaxError: Unexpected token ';'"
+PASS Invalid: "function f() { for (of of; of; of){} }". Produced the following syntax error: "SyntaxError: Unexpected token ';'"
+PASS Invalid: "for (of of []; of; of){}". Produced the following syntax error: "SyntaxError: Unexpected token ';'. Expected ')' to end a for-of header."
+PASS Invalid: "function f() { for (of of []; of; of){} }". Produced the following syntax error: "SyntaxError: Unexpected token ';'. Expected ')' to end a for-of header."
+PASS Invalid: "for (of of){}". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { for (of of){} }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "for (var of of){}". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { for (var of of){} }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "for (of of in of){}". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'"
+PASS Invalid: "function f() { for (of of in of){} }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'in'"
+PASS Invalid: "for (of in){}". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { for (of in){} }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "for (var of in){}". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { for (var of in){} }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
</ins><span class="cx"> spread operator and destructuring
</span><span class="cx"> PASS Valid: "foo(...bar)" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { foo(...bar) }"
</span><span class="lines">@@ -915,18 +915,18 @@
</span><span class="cx"> PASS Valid: "function f() { new o.foo(...bar) }"
</span><span class="cx"> PASS Valid: "new o[foo](...bar)" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { new o[foo](...bar) }"
</span><del>-PASS Invalid: "foo(...)"
-PASS Invalid: "function f() { foo(...) }"
-PASS Invalid: "o.foo(...)"
-PASS Invalid: "function f() { o.foo(...) }"
-PASS Invalid: "o[foo](...)"
-PASS Invalid: "function f() { o[foo](...) }"
-PASS Invalid: "foo(bar...)"
-PASS Invalid: "function f() { foo(bar...) }"
-PASS Invalid: "o.foo(bar...)"
-PASS Invalid: "function f() { o.foo(bar...) }"
-PASS Invalid: "o[foo](bar...)"
-PASS Invalid: "function f() { o[foo](bar...) }"
</del><ins>+PASS Invalid: "foo(...)". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { foo(...) }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "o.foo(...)". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { o.foo(...) }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "o[foo](...)". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { o[foo](...) }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "foo(bar...)". Produced the following syntax error: "SyntaxError: The '...' operator should come before the target expression."
+PASS Invalid: "function f() { foo(bar...) }". Produced the following syntax error: "SyntaxError: The '...' operator should come before the target expression."
+PASS Invalid: "o.foo(bar...)". Produced the following syntax error: "SyntaxError: The '...' operator should come before the target expression."
+PASS Invalid: "function f() { o.foo(bar...) }". Produced the following syntax error: "SyntaxError: The '...' operator should come before the target expression."
+PASS Invalid: "o[foo](bar...)". Produced the following syntax error: "SyntaxError: The '...' operator should come before the target expression."
+PASS Invalid: "function f() { o[foo](bar...) }". Produced the following syntax error: "SyntaxError: The '...' operator should come before the target expression."
</ins><span class="cx"> PASS Valid: "foo(a,...bar)" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { foo(a,...bar) }"
</span><span class="cx"> PASS Valid: "o.foo(a,...bar)" with ReferenceError
</span><span class="lines">@@ -1003,88 +1003,88 @@
</span><span class="cx"> PASS Valid: "function f() { ({a}=1=1) }"
</span><span class="cx"> PASS Valid: "({a:a}=1=1)" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { ({a:a}=1=1) }"
</span><del>-PASS Invalid: "var {x}"
-PASS Invalid: "function f() { var {x} }"
-PASS Invalid: "var {x, y}"
-PASS Invalid: "function f() { var {x, y} }"
-PASS Invalid: "var {x} = 20, {x, y}"
-PASS Invalid: "function f() { var {x} = 20, {x, y} }"
-PASS Invalid: "var {foo:bar, bar:baz}"
-PASS Invalid: "function f() { var {foo:bar, bar:baz} }"
-PASS Invalid: "var [x]"
-PASS Invalid: "function f() { var [x] }"
-PASS Invalid: "var [x, y]"
-PASS Invalid: "function f() { var [x, y] }"
-PASS Invalid: "var [x] = [], [x, y]"
-PASS Invalid: "function f() { var [x] = [], [x, y] }"
</del><ins>+PASS Invalid: "var {x}". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { var {x} }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected an initializer in destructuring variable declaration."
+PASS Invalid: "var {x, y}". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { var {x, y} }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected an initializer in destructuring variable declaration."
+PASS Invalid: "var {x} = 20, {x, y}". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { var {x} = 20, {x, y} }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected an initializer in destructuring variable declaration."
+PASS Invalid: "var {foo:bar, bar:baz}". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { var {foo:bar, bar:baz} }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected an initializer in destructuring variable declaration."
+PASS Invalid: "var [x]". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { var [x] }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected an initializer in destructuring variable declaration."
+PASS Invalid: "var [x, y]". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { var [x, y] }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected an initializer in destructuring variable declaration."
+PASS Invalid: "var [x] = [], [x, y]". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { var [x] = [], [x, y] }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected an initializer in destructuring variable declaration."
</ins><span class="cx"> PASS Valid: "({get x(){}})"
</span><span class="cx"> PASS Valid: "function f() { ({get x(){}}) }"
</span><span class="cx"> PASS Valid: "({set x(x){}})"
</span><span class="cx"> PASS Valid: "function f() { ({set x(x){}}) }"
</span><del>-PASS Invalid: "({get x(a){}})"
-PASS Invalid: "function f() { ({get x(a){}}) }"
-PASS Invalid: "({get x(a,b){}})"
-PASS Invalid: "function f() { ({get x(a,b){}}) }"
-PASS Invalid: "({set x(){}})"
-PASS Invalid: "function f() { ({set x(){}}) }"
-PASS Invalid: "({set x(a,b){}})"
-PASS Invalid: "function f() { ({set x(a,b){}}) }"
</del><ins>+PASS Invalid: "({get x(a){}})". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. getter functions must have no parameters."
+PASS Invalid: "function f() { ({get x(a){}}) }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. getter functions must have no parameters."
+PASS Invalid: "({get x(a,b){}})". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. getter functions must have no parameters."
+PASS Invalid: "function f() { ({get x(a,b){}}) }". Produced the following syntax error: "SyntaxError: Unexpected identifier 'a'. getter functions must have no parameters."
+PASS Invalid: "({set x(){}})". Produced the following syntax error: "SyntaxError: Unexpected token ')'. setter functions must have one parameter."
+PASS Invalid: "function f() { ({set x(){}}) }". Produced the following syntax error: "SyntaxError: Unexpected token ')'. setter functions must have one parameter."
+PASS Invalid: "({set x(a,b){}})". Produced the following syntax error: "SyntaxError: Unexpected token ','. setter functions must have one parameter."
+PASS Invalid: "function f() { ({set x(a,b){}}) }". Produced the following syntax error: "SyntaxError: Unexpected token ','. setter functions must have one parameter."
</ins><span class="cx"> PASS Valid: "({get [x](){}})"
</span><span class="cx"> PASS Valid: "function f() { ({get [x](){}}) }"
</span><del>-PASS Invalid: "({get [x (){}})"
-PASS Invalid: "function f() { ({get [x (){}}) }"
-PASS Invalid: "({set [x](){}})"
-PASS Invalid: "function f() { ({set [x](){}}) }"
</del><ins>+PASS Invalid: "({get [x (){}})". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected ']' to end a computed property name."
+PASS Invalid: "function f() { ({get [x (){}}) }". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected ']' to end a computed property name."
+PASS Invalid: "({set [x](){}})". Produced the following syntax error: "SyntaxError: Unexpected token ')'. setter functions must have one parameter."
+PASS Invalid: "function f() { ({set [x](){}}) }". Produced the following syntax error: "SyntaxError: Unexpected token ')'. setter functions must have one parameter."
</ins><span class="cx"> PASS Valid: "({set [x](x){}})"
</span><span class="cx"> PASS Valid: "function f() { ({set [x](x){}}) }"
</span><del>-PASS Invalid: "({set [x (x){}})"
-PASS Invalid: "function f() { ({set [x (x){}}) }"
</del><ins>+PASS Invalid: "({set [x (x){}})". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected ']' to end a computed property name."
+PASS Invalid: "function f() { ({set [x (x){}}) }". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected ']' to end a computed property name."
</ins><span class="cx"> PASS Valid: "({set foo(x) { } })"
</span><span class="cx"> PASS Valid: "function f() { ({set foo(x) { } }) }"
</span><span class="cx"> PASS Valid: "({set foo(x) { 'use strict'; } })"
</span><span class="cx"> PASS Valid: "function f() { ({set foo(x) { 'use strict'; } }) }"
</span><del>-PASS Invalid: "({set foo(x = 20) { 'use strict'; } })"
-PASS Invalid: "function f() { ({set foo(x = 20) { 'use strict'; } }) }"
-PASS Invalid: "({set foo({x}) { 'use strict'; } })"
-PASS Invalid: "function f() { ({set foo({x}) { 'use strict'; } }) }"
-PASS Invalid: "({set foo([x]) { 'use strict'; } })"
-PASS Invalid: "function f() { ({set foo([x]) { 'use strict'; } }) }"
-PASS Invalid: "({set foo(...x) {} })"
-PASS Invalid: "function f() { ({set foo(...x) {} }) }"
</del><ins>+PASS Invalid: "({set foo(x = 20) { 'use strict'; } })". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { ({set foo(x = 20) { 'use strict'; } }) }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "({set foo({x}) { 'use strict'; } })". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { ({set foo({x}) { 'use strict'; } }) }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "({set foo([x]) { 'use strict'; } })". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { ({set foo([x]) { 'use strict'; } }) }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "({set foo(...x) {} })". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "function f() { ({set foo(...x) {} }) }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a parameter pattern or a ')' in parameter list."
</ins><span class="cx"> PASS Valid: "class Foo { set v(z) { } }"
</span><span class="cx"> PASS Valid: "function f() { class Foo { set v(z) { } } }"
</span><span class="cx"> PASS Valid: "class Foo { set v(z) { 'use strict'; } }"
</span><span class="cx"> PASS Valid: "function f() { class Foo { set v(z) { 'use strict'; } } }"
</span><del>-PASS Invalid: "class Foo { set v(z = 50) { 'use strict'; } }"
-PASS Invalid: "function f() { class Foo { set v(z = 50) { 'use strict'; } } }"
-PASS Invalid: "class Foo { set v({z}) { 'use strict'; } }"
-PASS Invalid: "function f() { class Foo { set v({z}) { 'use strict'; } } }"
-PASS Invalid: "class Foo { set v([z]) { 'use strict'; } }"
-PASS Invalid: "function f() { class Foo { set v([z]) { 'use strict'; } } }"
-PASS Invalid: "class Foo { set v(...z) { } }"
-PASS Invalid: "function f() { class Foo { set v(...z) { } } }"
-PASS Invalid: "class foo { set y([x, y, x]) { } }"
-PASS Invalid: "function f() { class foo { set y([x, y, x]) { } } }"
-PASS Invalid: "class foo { set y([x, y, {x}]) { } }"
-PASS Invalid: "function f() { class foo { set y([x, y, {x}]) { } } }"
-PASS Invalid: "class foo { set y({x, x}) { } }"
-PASS Invalid: "function f() { class foo { set y({x, x}) { } } }"
-PASS Invalid: "class foo { set y({x, field: {x}}) { } }"
-PASS Invalid: "function f() { class foo { set y({x, field: {x}}) { } } }"
</del><ins>+PASS Invalid: "class Foo { set v(z = 50) { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { class Foo { set v(z = 50) { 'use strict'; } } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "class Foo { set v({z}) { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { class Foo { set v({z}) { 'use strict'; } } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "class Foo { set v([z]) { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { class Foo { set v([z]) { 'use strict'; } } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "class Foo { set v(...z) { } }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "function f() { class Foo { set v(...z) { } } }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "class foo { set y([x, y, x]) { } }". Produced the following syntax error: "SyntaxError: Cannot declare a parameter named 'x' in strict mode as it has already been declared."
+PASS Invalid: "function f() { class foo { set y([x, y, x]) { } } }". Produced the following syntax error: "SyntaxError: Cannot declare a parameter named 'x' in strict mode as it has already been declared."
+PASS Invalid: "class foo { set y([x, y, {x}]) { } }". Produced the following syntax error: "SyntaxError: Cannot declare a parameter named 'x' in strict mode as it has already been declared."
+PASS Invalid: "function f() { class foo { set y([x, y, {x}]) { } } }". Produced the following syntax error: "SyntaxError: Cannot declare a parameter named 'x' in strict mode as it has already been declared."
+PASS Invalid: "class foo { set y({x, x}) { } }". Produced the following syntax error: "SyntaxError: Cannot declare a parameter named 'x' in strict mode as it has already been declared."
+PASS Invalid: "function f() { class foo { set y({x, x}) { } } }". Produced the following syntax error: "SyntaxError: Cannot declare a parameter named 'x' in strict mode as it has already been declared."
+PASS Invalid: "class foo { set y({x, field: {x}}) { } }". Produced the following syntax error: "SyntaxError: Cannot declare a parameter named 'x' in strict mode as it has already been declared."
+PASS Invalid: "function f() { class foo { set y({x, field: {x}}) { } } }". Produced the following syntax error: "SyntaxError: Cannot declare a parameter named 'x' in strict mode as it has already been declared."
</ins><span class="cx"> PASS Valid: "class foo { set y({x, field: {xx}}) { } }"
</span><span class="cx"> PASS Valid: "function f() { class foo { set y({x, field: {xx}}) { } } }"
</span><del>-PASS Invalid: "({[...x]: 1})"
-PASS Invalid: "function f() { ({[...x]: 1}) }"
-PASS Invalid: "function f({a, a}) {}"
-PASS Invalid: "function f() { function f({a, a}) {} }"
-PASS Invalid: "function f({a}, a) {}"
-PASS Invalid: "function f() { function f({a}, a) {} }"
-PASS Invalid: "function f([b, b]) {}"
-PASS Invalid: "function f() { function f([b, b]) {} }"
-PASS Invalid: "function f([b], b) {}"
-PASS Invalid: "function f() { function f([b], b) {} }"
-PASS Invalid: "function f({a: {b}}, b) {}"
-PASS Invalid: "function f() { function f({a: {b}}, b) {} }"
</del><ins>+PASS Invalid: "({[...x]: 1})". Produced the following syntax error: "SyntaxError: Unexpected token '...'"
+PASS Invalid: "function f() { ({[...x]: 1}) }". Produced the following syntax error: "SyntaxError: Unexpected token '...'"
+PASS Invalid: "function f({a, a}) {}". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
+PASS Invalid: "function f() { function f({a, a}) {} }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
+PASS Invalid: "function f({a}, a) {}". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
+PASS Invalid: "function f() { function f({a}, a) {} }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
+PASS Invalid: "function f([b, b]) {}". Produced the following syntax error: "SyntaxError: Duplicate parameter 'b' not allowed in function with destructuring parameters."
+PASS Invalid: "function f() { function f([b, b]) {} }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'b' not allowed in function with destructuring parameters."
+PASS Invalid: "function f([b], b) {}". Produced the following syntax error: "SyntaxError: Duplicate parameter 'b' not allowed in function with destructuring parameters."
+PASS Invalid: "function f() { function f([b], b) {} }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'b' not allowed in function with destructuring parameters."
+PASS Invalid: "function f({a: {b}}, b) {}". Produced the following syntax error: "SyntaxError: Duplicate parameter 'b' not allowed in function with destructuring parameters."
+PASS Invalid: "function f() { function f({a: {b}}, b) {} }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'b' not allowed in function with destructuring parameters."
</ins><span class="cx"> PASS Valid: "function f(a, b = 20) {}"
</span><span class="cx"> PASS Valid: "function f() { function f(a, b = 20) {} }"
</span><span class="cx"> PASS Valid: "function f(a = 20, b = a) {}"
</span><span class="lines">@@ -1093,64 +1093,64 @@
</span><span class="cx"> PASS Valid: "function f() { function f({a = 20} = {a: 40}, b = a) {} }"
</span><span class="cx"> PASS Valid: "function f([a,b,c] = [1,2,3]) {}"
</span><span class="cx"> PASS Valid: "function f() { function f([a,b,c] = [1,2,3]) {} }"
</span><del>-PASS Invalid: "function f(a, a=20) {}"
-PASS Invalid: "function f() { function f(a, a=20) {} }"
-PASS Invalid: "function f({a} = 20, a=20) {}"
-PASS Invalid: "function f() { function f({a} = 20, a=20) {} }"
-PASS Invalid: "function f([a,b,a] = [1,2,3]) {}"
-PASS Invalid: "function f() { function f([a,b,a] = [1,2,3]) {} }"
-PASS Invalid: "function f([a,b,c] = [1,2,3], a) {}"
-PASS Invalid: "function f() { function f([a,b,c] = [1,2,3], a) {} }"
-PASS Invalid: "function f([a,b,c] = [1,2,3], {a}) {}"
-PASS Invalid: "function f() { function f([a,b,c] = [1,2,3], {a}) {} }"
</del><ins>+PASS Invalid: "function f(a, a=20) {}". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with default parameter values."
+PASS Invalid: "function f() { function f(a, a=20) {} }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with default parameter values."
+PASS Invalid: "function f({a} = 20, a=20) {}". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with default parameter values."
+PASS Invalid: "function f() { function f({a} = 20, a=20) {} }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with default parameter values."
+PASS Invalid: "function f([a,b,a] = [1,2,3]) {}". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with default parameter values."
+PASS Invalid: "function f() { function f([a,b,a] = [1,2,3]) {} }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with default parameter values."
+PASS Invalid: "function f([a,b,c] = [1,2,3], a) {}". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with default parameter values."
+PASS Invalid: "function f() { function f([a,b,c] = [1,2,3], a) {} }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with default parameter values."
+PASS Invalid: "function f([a,b,c] = [1,2,3], {a}) {}". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with default parameter values."
+PASS Invalid: "function f() { function f([a,b,c] = [1,2,3], {a}) {} }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with default parameter values."
</ins><span class="cx"> PASS Valid: "( function(){ return this || eval('this'); }().x = 'y' )"
</span><span class="cx"> PASS Valid: "function f() { ( function(){ return this || eval('this'); }().x = 'y' ) }"
</span><del>-PASS Invalid: "function(){ return this || eval('this'); }().x = 'y'"
-PASS Invalid: "function f() { function(){ return this || eval('this'); }().x = 'y' }"
-PASS Invalid: "1 % +"
-PASS Invalid: "function f() { 1 % + }"
-PASS Invalid: "1 % -"
-PASS Invalid: "function f() { 1 % - }"
-PASS Invalid: "1 % typeof"
-PASS Invalid: "function f() { 1 % typeof }"
-PASS Invalid: "1 % void"
-PASS Invalid: "function f() { 1 % void }"
-PASS Invalid: "1 % !"
-PASS Invalid: "function f() { 1 % ! }"
-PASS Invalid: "1 % ~"
-PASS Invalid: "function f() { 1 % ~ }"
-PASS Invalid: "1 % delete"
-PASS Invalid: "function f() { 1 % delete }"
-PASS Invalid: "1 % ++"
-PASS Invalid: "function f() { 1 % ++ }"
-PASS Invalid: "1 % --"
-PASS Invalid: "function f() { 1 % -- }"
</del><ins>+PASS Invalid: "function(){ return this || eval('this'); }().x = 'y'". Produced the following syntax error: "SyntaxError: Function statements must have a name."
+PASS Invalid: "function f() { function(){ return this || eval('this'); }().x = 'y' }". Produced the following syntax error: "SyntaxError: Function statements must have a name."
+PASS Invalid: "1 % +". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { 1 % + }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "1 % -". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { 1 % - }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "1 % typeof". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { 1 % typeof }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "1 % void". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { 1 % void }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "1 % !". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { 1 % ! }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "1 % ~". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { 1 % ~ }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "1 % delete". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { 1 % delete }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "1 % ++". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { 1 % ++ }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "1 % --". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { 1 % -- }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
</ins><span class="cx"> PASS Invalid: "1 %
</span><del>-++"
</del><ins>+++". Produced the following syntax error: "SyntaxError: Unexpected end of script"
</ins><span class="cx"> PASS Invalid: "function f() { 1 %
</span><del>-++ }"
</del><ins>+++ }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
</ins><span class="cx"> PASS Invalid: "1 %
</span><del>---"
</del><ins>+--". Produced the following syntax error: "SyntaxError: Unexpected end of script"
</ins><span class="cx"> PASS Invalid: "function f() { 1 %
</span><del>--- }"
-PASS Invalid: "let {w} = (foo-=()), {} = ("a" ^= "b");"
-PASS Invalid: "function f() { let {w} = (foo-=()), {} = ("a" ^= "b"); }"
-PASS Invalid: "const {w} = (foo-=()), {} = ("a" ^= "b");"
-PASS Invalid: "function f() { const {w} = (foo-=()), {} = ("a" ^= "b"); }"
-PASS Invalid: "var {w} = (foo-=()), {} = ("a" ^= "b");"
-PASS Invalid: "function f() { var {w} = (foo-=()), {} = ("a" ^= "b"); }"
-PASS Invalid: "let {w} = ();"
-PASS Invalid: "function f() { let {w} = (); }"
-PASS Invalid: "let {w} = 1234abc;"
-PASS Invalid: "function f() { let {w} = 1234abc; }"
-PASS Invalid: "const {w} = 1234abc;"
-PASS Invalid: "function f() { const {w} = 1234abc; }"
-PASS Invalid: "var {w} = 1234abc;"
-PASS Invalid: "function f() { var {w} = 1234abc; }"
-PASS Invalid: "var [...x = 20] = 20;"
-PASS Invalid: "function f() { var [...x = 20] = 20; }"
-PASS Invalid: "var [...[...x = 20]] = 20;"
-PASS Invalid: "function f() { var [...[...x = 20]] = 20; }"
</del><ins>+-- }". Produced the following syntax error: "SyntaxError: Unexpected token '}'"
+PASS Invalid: "let {w} = (foo-=()), {} = ("a" ^= "b");". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { let {w} = (foo-=()), {} = ("a" ^= "b"); }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "const {w} = (foo-=()), {} = ("a" ^= "b");". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { const {w} = (foo-=()), {} = ("a" ^= "b"); }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "var {w} = (foo-=()), {} = ("a" ^= "b");". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { var {w} = (foo-=()), {} = ("a" ^= "b"); }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "let {w} = ();". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { let {w} = (); }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "let {w} = 1234abc;". Produced the following syntax error: "SyntaxError: No identifiers allowed directly after numeric literal"
+PASS Invalid: "function f() { let {w} = 1234abc; }". Produced the following syntax error: "SyntaxError: No identifiers allowed directly after numeric literal"
+PASS Invalid: "const {w} = 1234abc;". Produced the following syntax error: "SyntaxError: No identifiers allowed directly after numeric literal"
+PASS Invalid: "function f() { const {w} = 1234abc; }". Produced the following syntax error: "SyntaxError: No identifiers allowed directly after numeric literal"
+PASS Invalid: "var {w} = 1234abc;". Produced the following syntax error: "SyntaxError: No identifiers allowed directly after numeric literal"
+PASS Invalid: "function f() { var {w} = 1234abc; }". Produced the following syntax error: "SyntaxError: No identifiers allowed directly after numeric literal"
+PASS Invalid: "var [...x = 20] = 20;". Produced the following syntax error: "SyntaxError: Unexpected token '='. Expected a closing ']' following a rest element destructuring pattern."
+PASS Invalid: "function f() { var [...x = 20] = 20; }". Produced the following syntax error: "SyntaxError: Unexpected token '='. Expected a closing ']' following a rest element destructuring pattern."
+PASS Invalid: "var [...[...x = 20]] = 20;". Produced the following syntax error: "SyntaxError: Unexpected token '='. Expected a closing ']' following a rest element destructuring pattern."
+PASS Invalid: "function f() { var [...[...x = 20]] = 20; }". Produced the following syntax error: "SyntaxError: Unexpected token '='. Expected a closing ']' following a rest element destructuring pattern."
</ins><span class="cx"> PASS Valid: "var [...x] = 20;" with TypeError
</span><span class="cx"> PASS Valid: "function f() { var [...x] = 20; }"
</span><span class="cx"> PASS Valid: "var [...[...x]] = 20;" with TypeError
</span><span class="lines">@@ -1165,10 +1165,10 @@
</span><span class="cx"> PASS Valid: "function f() { var {x: [y, ...[...[...{z: [...z]}]]]} = 20 }"
</span><span class="cx"> PASS Valid: "var {x: [y, {z: {z: [...z]}}]} = 20" with TypeError
</span><span class="cx"> PASS Valid: "function f() { var {x: [y, {z: {z: [...z]}}]} = 20 }"
</span><del>-PASS Invalid: "var [...y, ...z] = 20"
-PASS Invalid: "function f() { var [...y, ...z] = 20 }"
-PASS Invalid: "var [...{...y}] = 20"
-PASS Invalid: "function f() { var [...{...y}] = 20 }"
</del><ins>+PASS Invalid: "var [...y, ...z] = 20". Produced the following syntax error: "SyntaxError: Unexpected token ','. Expected a closing ']' following a rest element destructuring pattern."
+PASS Invalid: "function f() { var [...y, ...z] = 20 }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Expected a closing ']' following a rest element destructuring pattern."
+PASS Invalid: "var [...{...y}] = 20". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { var [...{...y}] = 20 }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
</ins><span class="cx"> Rest parameter
</span><span class="cx"> PASS Valid: "function foo(...a) { }"
</span><span class="cx"> PASS Valid: "function f() { function foo(...a) { } }"
</span><span class="lines">@@ -1178,50 +1178,50 @@
</span><span class="cx"> PASS Valid: "function f() { function foo(a = 20, ...b) { } }"
</span><span class="cx"> PASS Valid: "function foo(a, b, c, d, e, f, g, ...h) { }"
</span><span class="cx"> PASS Valid: "function f() { function foo(a, b, c, d, e, f, g, ...h) { } }"
</span><del>-PASS Invalid: "function foo(a, ...b, c) { }"
-PASS Invalid: "function f() { function foo(a, ...b, c) { } }"
-PASS Invalid: "function foo(a, ...b, ) { }"
-PASS Invalid: "function f() { function foo(a, ...b, ) { } }"
-PASS Invalid: "function foo(a, ...[b], ) { }"
-PASS Invalid: "function f() { function foo(a, ...[b], ) { } }"
-PASS Invalid: "function foo(a, ...{b}, ) { }"
-PASS Invalid: "function f() { function foo(a, ...{b}, ) { } }"
-PASS Invalid: "function foo(a, ...a) { }"
-PASS Invalid: "function f() { function foo(a, ...a) { } }"
-PASS Invalid: "function foo(...a, ...b) { }"
-PASS Invalid: "function f() { function foo(...a, ...b) { } }"
-PASS Invalid: "function foo(...b, ...b) { }"
-PASS Invalid: "function f() { function foo(...b, ...b) { } }"
-PASS Invalid: "function foo(...b ...b) { }"
-PASS Invalid: "function f() { function foo(...b ...b) { } }"
-PASS Invalid: "function foo(a, a, ...b) { }"
-PASS Invalid: "function f() { function foo(a, a, ...b) { } }"
-PASS Invalid: "function foo(a, ...{b} = 20) { }"
-PASS Invalid: "function f() { function foo(a, ...{b} = 20) { } }"
-PASS Invalid: "function foo(a, ...b = 20) { }"
-PASS Invalid: "function f() { function foo(a, ...b = 20) { } }"
</del><ins>+PASS Invalid: "function foo(a, ...b, c) { }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Rest parameter should be the last parameter in a function declaration."
+PASS Invalid: "function f() { function foo(a, ...b, c) { } }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Rest parameter should be the last parameter in a function declaration."
+PASS Invalid: "function foo(a, ...b, ) { }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Rest parameter should be the last parameter in a function declaration."
+PASS Invalid: "function f() { function foo(a, ...b, ) { } }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Rest parameter should be the last parameter in a function declaration."
+PASS Invalid: "function foo(a, ...[b], ) { }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Rest parameter should be the last parameter in a function declaration."
+PASS Invalid: "function f() { function foo(a, ...[b], ) { } }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Rest parameter should be the last parameter in a function declaration."
+PASS Invalid: "function foo(a, ...{b}, ) { }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Rest parameter should be the last parameter in a function declaration."
+PASS Invalid: "function f() { function foo(a, ...{b}, ) { } }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Rest parameter should be the last parameter in a function declaration."
+PASS Invalid: "function foo(a, ...a) { }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with a rest parameter."
+PASS Invalid: "function f() { function foo(a, ...a) { } }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with a rest parameter."
+PASS Invalid: "function foo(...a, ...b) { }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Rest parameter should be the last parameter in a function declaration."
+PASS Invalid: "function f() { function foo(...a, ...b) { } }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Rest parameter should be the last parameter in a function declaration."
+PASS Invalid: "function foo(...b, ...b) { }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Rest parameter should be the last parameter in a function declaration."
+PASS Invalid: "function f() { function foo(...b, ...b) { } }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Rest parameter should be the last parameter in a function declaration."
+PASS Invalid: "function foo(...b ...b) { }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a ')' or a ',' after a parameter declaration."
+PASS Invalid: "function f() { function foo(...b ...b) { } }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a ')' or a ',' after a parameter declaration."
+PASS Invalid: "function foo(a, a, ...b) { }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with a rest parameter."
+PASS Invalid: "function f() { function foo(a, a, ...b) { } }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with a rest parameter."
+PASS Invalid: "function foo(a, ...{b} = 20) { }". Produced the following syntax error: "SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration."
+PASS Invalid: "function f() { function foo(a, ...{b} = 20) { } }". Produced the following syntax error: "SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration."
+PASS Invalid: "function foo(a, ...b = 20) { }". Produced the following syntax error: "SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration."
+PASS Invalid: "function f() { function foo(a, ...b = 20) { } }". Produced the following syntax error: "SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration."
</ins><span class="cx"> PASS Valid: "function foo(...{b}) { }"
</span><span class="cx"> PASS Valid: "function f() { function foo(...{b}) { } }"
</span><span class="cx"> PASS Valid: "function foo(...[b]) { }"
</span><span class="cx"> PASS Valid: "function f() { function foo(...[b]) { } }"
</span><del>-PASS Invalid: "function foo(...123) { }"
-PASS Invalid: "function f() { function foo(...123) { } }"
-PASS Invalid: "function foo(...123abc) { }"
-PASS Invalid: "function f() { function foo(...123abc) { } }"
</del><ins>+PASS Invalid: "function foo(...123) { }". Produced the following syntax error: "SyntaxError: Unexpected number '123'. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "function f() { function foo(...123) { } }". Produced the following syntax error: "SyntaxError: Unexpected number '123'. Expected a parameter pattern or a ')' in parameter list."
+PASS Invalid: "function foo(...123abc) { }". Produced the following syntax error: "SyntaxError: No identifiers allowed directly after numeric literal"
+PASS Invalid: "function f() { function foo(...123abc) { } }". Produced the following syntax error: "SyntaxError: No identifiers allowed directly after numeric literal"
</ins><span class="cx"> PASS Valid: "function foo(...abc123) { }"
</span><span class="cx"> PASS Valid: "function f() { function foo(...abc123) { } }"
</span><span class="cx"> PASS Valid: "function foo(...let) { }"
</span><span class="cx"> PASS Valid: "function f() { function foo(...let) { } }"
</span><del>-PASS Invalid: "'use strict'; function foo(...let) { }"
-PASS Invalid: "function f() { 'use strict'; function foo(...let) { } }"
-PASS Invalid: "'use strict'; function foo(...[let]) { }"
-PASS Invalid: "function f() { 'use strict'; function foo(...[let]) { } }"
</del><ins>+PASS Invalid: "'use strict'; function foo(...let) { }". Produced the following syntax error: "SyntaxError: Cannot use the keyword 'let' as a parameter name."
+PASS Invalid: "function f() { 'use strict'; function foo(...let) { } }". Produced the following syntax error: "SyntaxError: Cannot use the keyword 'let' as a parameter name."
+PASS Invalid: "'use strict'; function foo(...[let]) { }". Produced the following syntax error: "SyntaxError: Cannot use the keyword 'let' as a parameter name."
+PASS Invalid: "function f() { 'use strict'; function foo(...[let]) { } }". Produced the following syntax error: "SyntaxError: Cannot use the keyword 'let' as a parameter name."
</ins><span class="cx"> PASS Valid: "function foo(...yield) { }"
</span><span class="cx"> PASS Valid: "function f() { function foo(...yield) { } }"
</span><del>-PASS Invalid: "'use strict'; function foo(...yield) { }"
-PASS Invalid: "function f() { 'use strict'; function foo(...yield) { } }"
-PASS Invalid: "function foo(...if) { }"
-PASS Invalid: "function f() { function foo(...if) { } }"
</del><ins>+PASS Invalid: "'use strict'; function foo(...yield) { }". Produced the following syntax error: "SyntaxError: Cannot use the keyword 'yield' as a parameter name."
+PASS Invalid: "function f() { 'use strict'; function foo(...yield) { } }". Produced the following syntax error: "SyntaxError: Cannot use the keyword 'yield' as a parameter name."
+PASS Invalid: "function foo(...if) { }". Produced the following syntax error: "SyntaxError: Cannot use the keyword 'if' as a parameter name."
+PASS Invalid: "function f() { function foo(...if) { } }". Produced the following syntax error: "SyntaxError: Cannot use the keyword 'if' as a parameter name."
</ins><span class="cx"> PASS Valid: "let x = (...a) => { }"
</span><span class="cx"> PASS Valid: "function f() { let x = (...a) => { } }"
</span><span class="cx"> PASS Valid: "let x = (a, ...b) => { }"
</span><span class="lines">@@ -1228,8 +1228,8 @@
</span><span class="cx"> PASS Valid: "function f() { let x = (a, ...b) => { } }"
</span><span class="cx"> PASS Valid: "let x = (a = 20, ...b) => { }"
</span><span class="cx"> PASS Valid: "function f() { let x = (a = 20, ...b) => { } }"
</span><del>-PASS Invalid: "let x = (a = 20, ...b, ...c) => { }"
-PASS Invalid: "function f() { let x = (a = 20, ...b, ...c) => { } }"
</del><ins>+PASS Invalid: "let x = (a = 20, ...b, ...c) => { }". Produced the following syntax error: "SyntaxError: Unexpected token '...'"
+PASS Invalid: "function f() { let x = (a = 20, ...b, ...c) => { } }". Produced the following syntax error: "SyntaxError: Unexpected token '...'"
</ins><span class="cx"> PASS Valid: "let x = (a = 20, ...[...b]) => { }"
</span><span class="cx"> PASS Valid: "function f() { let x = (a = 20, ...[...b]) => { } }"
</span><span class="cx"> PASS Valid: "let x = (a = 20, ...[...[b = 40]]) => { }"
</span><span class="lines">@@ -1236,75 +1236,75 @@
</span><span class="cx"> PASS Valid: "function f() { let x = (a = 20, ...[...[b = 40]]) => { } }"
</span><span class="cx"> PASS Valid: "let x = (a = 20, ...{b}) => { }"
</span><span class="cx"> PASS Valid: "function f() { let x = (a = 20, ...{b}) => { } }"
</span><del>-PASS Invalid: "let x = (a = 20, ...{...b}) => { }"
-PASS Invalid: "function f() { let x = (a = 20, ...{...b}) => { } }"
-PASS Invalid: "let x = (a = 20, ...{124}) => { }"
-PASS Invalid: "function f() { let x = (a = 20, ...{124}) => { } }"
</del><ins>+PASS Invalid: "let x = (a = 20, ...{...b}) => { }". Produced the following syntax error: "SyntaxError: Unexpected token '...'"
+PASS Invalid: "function f() { let x = (a = 20, ...{...b}) => { } }". Produced the following syntax error: "SyntaxError: Unexpected token '...'"
+PASS Invalid: "let x = (a = 20, ...{124}) => { }". Produced the following syntax error: "SyntaxError: Unexpected token '...'"
+PASS Invalid: "function f() { let x = (a = 20, ...{124}) => { } }". Produced the following syntax error: "SyntaxError: Unexpected token '...'"
</ins><span class="cx"> non-simple parameter list
</span><del>-PASS Invalid: "function foo(...restParam) { 'use strict'; }"
-PASS Invalid: "function f() { function foo(...restParam) { 'use strict'; } }"
-PASS Invalid: "function foo(...restParam) { 'a'; 'use strict'; }"
-PASS Invalid: "function f() { function foo(...restParam) { 'a'; 'use strict'; } }"
-PASS Invalid: "function foo({x}) { 'use strict'; }"
-PASS Invalid: "function f() { function foo({x}) { 'use strict'; } }"
-PASS Invalid: "function foo({x}) { 'a'; 'use strict'; }"
-PASS Invalid: "function f() { function foo({x}) { 'a'; 'use strict'; } }"
-PASS Invalid: "function foo(a = 20) { 'use strict'; }"
-PASS Invalid: "function f() { function foo(a = 20) { 'use strict'; } }"
-PASS Invalid: "function foo(a = 20) { 'a'; 'use strict'; }"
-PASS Invalid: "function f() { function foo(a = 20) { 'a'; 'use strict'; } }"
-PASS Invalid: "function foo({a} = 20) { 'use strict'; }"
-PASS Invalid: "function f() { function foo({a} = 20) { 'use strict'; } }"
-PASS Invalid: "function foo({a} = 20) { 'a'; 'use strict'; }"
-PASS Invalid: "function f() { function foo({a} = 20) { 'a'; 'use strict'; } }"
-PASS Invalid: "function foo([a]) { 'use strict'; }"
-PASS Invalid: "function f() { function foo([a]) { 'use strict'; } }"
-PASS Invalid: "function foo([a]) { 'a'; 'use strict'; }"
-PASS Invalid: "function f() { function foo([a]) { 'a'; 'use strict'; } }"
-PASS Invalid: "function foo(foo, bar, a = 25) { 'use strict'; }"
-PASS Invalid: "function f() { function foo(foo, bar, a = 25) { 'use strict'; } }"
-PASS Invalid: "function foo(foo, bar, a = 25) { 'a'; 'use strict'; }"
-PASS Invalid: "function f() { function foo(foo, bar, a = 25) { 'a'; 'use strict'; } }"
-PASS Invalid: "function foo(foo, bar, baz, ...rest) { 'use strict'; }"
-PASS Invalid: "function f() { function foo(foo, bar, baz, ...rest) { 'use strict'; } }"
-PASS Invalid: "function foo(foo, bar, baz, ...rest) { 'a'; 'use strict'; }"
-PASS Invalid: "function f() { function foo(foo, bar, baz, ...rest) { 'a'; 'use strict'; } }"
-PASS Invalid: "function foo(a = function() { }) { 'use strict'; a(); }"
-PASS Invalid: "function f() { function foo(a = function() { }) { 'use strict'; a(); } }"
-PASS Invalid: "function foo(a = function() { }) { 'a'; 'use strict'; a(); }"
-PASS Invalid: "function f() { function foo(a = function() { }) { 'a'; 'use strict'; a(); } }"
-PASS Invalid: "let foo = (...restParam) => { 'use strict'; }"
-PASS Invalid: "function f() { let foo = (...restParam) => { 'use strict'; } }"
-PASS Invalid: "let foo = (...restParam) => { 'a'; 'use strict'; }"
-PASS Invalid: "function f() { let foo = (...restParam) => { 'a'; 'use strict'; } }"
-PASS Invalid: "let foo = ({x}) => { 'use strict'; }"
-PASS Invalid: "function f() { let foo = ({x}) => { 'use strict'; } }"
-PASS Invalid: "let foo = ({x}) => { 'a'; 'use strict'; }"
-PASS Invalid: "function f() { let foo = ({x}) => { 'a'; 'use strict'; } }"
-PASS Invalid: "let foo = (a = 20) => { 'use strict'; }"
-PASS Invalid: "function f() { let foo = (a = 20) => { 'use strict'; } }"
-PASS Invalid: "let foo = (a = 20) => { 'a'; 'use strict'; }"
-PASS Invalid: "function f() { let foo = (a = 20) => { 'a'; 'use strict'; } }"
-PASS Invalid: "let foo = ({a} = 20) => { 'use strict'; }"
-PASS Invalid: "function f() { let foo = ({a} = 20) => { 'use strict'; } }"
-PASS Invalid: "let foo = ({a} = 20) => { 'a'; 'use strict'; }"
-PASS Invalid: "function f() { let foo = ({a} = 20) => { 'a'; 'use strict'; } }"
-PASS Invalid: "let foo = ([a]) => { 'use strict'; }"
-PASS Invalid: "function f() { let foo = ([a]) => { 'use strict'; } }"
-PASS Invalid: "let foo = ([a]) => { 'a'; 'use strict'; }"
-PASS Invalid: "function f() { let foo = ([a]) => { 'a'; 'use strict'; } }"
-PASS Invalid: "let foo = (foo, bar, a = 25) => { 'use strict'; }"
-PASS Invalid: "function f() { let foo = (foo, bar, a = 25) => { 'use strict'; } }"
-PASS Invalid: "let foo = (foo, bar, a = 25) => { 'a'; 'use strict'; }"
-PASS Invalid: "function f() { let foo = (foo, bar, a = 25) => { 'a'; 'use strict'; } }"
-PASS Invalid: "let foo = (foo, bar, baz, ...rest) => { 'use strict'; }"
-PASS Invalid: "function f() { let foo = (foo, bar, baz, ...rest) => { 'use strict'; } }"
-PASS Invalid: "let foo = (foo, bar, baz, ...rest) => { 'a'; 'use strict'; }"
-PASS Invalid: "function f() { let foo = (foo, bar, baz, ...rest) => { 'a'; 'use strict'; } }"
-PASS Invalid: "let foo = (a = function() { }) => { 'use strict'; a(); }"
-PASS Invalid: "function f() { let foo = (a = function() { }) => { 'use strict'; a(); } }"
-PASS Invalid: "let foo = (a = function() { }) => { 'a'; 'use strict'; a(); }"
-PASS Invalid: "function f() { let foo = (a = function() { }) => { 'a'; 'use strict'; a(); } }"
</del><ins>+PASS Invalid: "function foo(...restParam) { 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function foo(...restParam) { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function foo(...restParam) { 'a'; 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function foo(...restParam) { 'a'; 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function foo({x}) { 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function foo({x}) { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function foo({x}) { 'a'; 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function foo({x}) { 'a'; 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function foo(a = 20) { 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function foo(a = 20) { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function foo(a = 20) { 'a'; 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function foo(a = 20) { 'a'; 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function foo({a} = 20) { 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function foo({a} = 20) { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function foo({a} = 20) { 'a'; 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function foo({a} = 20) { 'a'; 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function foo([a]) { 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function foo([a]) { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function foo([a]) { 'a'; 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function foo([a]) { 'a'; 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function foo(foo, bar, a = 25) { 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function foo(foo, bar, a = 25) { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function foo(foo, bar, a = 25) { 'a'; 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function foo(foo, bar, a = 25) { 'a'; 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function foo(foo, bar, baz, ...rest) { 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function foo(foo, bar, baz, ...rest) { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function foo(foo, bar, baz, ...rest) { 'a'; 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function foo(foo, bar, baz, ...rest) { 'a'; 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function foo(a = function() { }) { 'use strict'; a(); }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function foo(a = function() { }) { 'use strict'; a(); } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function foo(a = function() { }) { 'a'; 'use strict'; a(); }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function foo(a = function() { }) { 'a'; 'use strict'; a(); } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "let foo = (...restParam) => { 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { let foo = (...restParam) => { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "let foo = (...restParam) => { 'a'; 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { let foo = (...restParam) => { 'a'; 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "let foo = ({x}) => { 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { let foo = ({x}) => { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "let foo = ({x}) => { 'a'; 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { let foo = ({x}) => { 'a'; 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "let foo = (a = 20) => { 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { let foo = (a = 20) => { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "let foo = (a = 20) => { 'a'; 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { let foo = (a = 20) => { 'a'; 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "let foo = ({a} = 20) => { 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { let foo = ({a} = 20) => { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "let foo = ({a} = 20) => { 'a'; 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { let foo = ({a} = 20) => { 'a'; 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "let foo = ([a]) => { 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { let foo = ([a]) => { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "let foo = ([a]) => { 'a'; 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { let foo = ([a]) => { 'a'; 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "let foo = (foo, bar, a = 25) => { 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { let foo = (foo, bar, a = 25) => { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "let foo = (foo, bar, a = 25) => { 'a'; 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { let foo = (foo, bar, a = 25) => { 'a'; 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "let foo = (foo, bar, baz, ...rest) => { 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { let foo = (foo, bar, baz, ...rest) => { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "let foo = (foo, bar, baz, ...rest) => { 'a'; 'use strict'; }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { let foo = (foo, bar, baz, ...rest) => { 'a'; 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "let foo = (a = function() { }) => { 'use strict'; a(); }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { let foo = (a = function() { }) => { 'use strict'; a(); } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "let foo = (a = function() { }) => { 'a'; 'use strict'; a(); }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { let foo = (a = function() { }) => { 'a'; 'use strict'; a(); } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
</ins><span class="cx"> PASS Valid: "function outer() { 'use strict'; function foo(...restParam) { } }"
</span><span class="cx"> PASS Valid: "function f() { function outer() { 'use strict'; function foo(...restParam) { } } }"
</span><span class="cx"> PASS Valid: "function outer() { 'use strict'; function foo(a,b,c,...restParam) { } }"
</span><span class="lines">@@ -1319,20 +1319,20 @@
</span><span class="cx"> PASS Valid: "function f() { function outer() { 'use strict'; function foo(a = 20) { } } }"
</span><span class="cx"> PASS Valid: "function outer() { 'use strict'; function foo(a,b,c,{d} = 20) { } }"
</span><span class="cx"> PASS Valid: "function f() { function outer() { 'use strict'; function foo(a,b,c,{d} = 20) { } } }"
</span><del>-PASS Invalid: "function outer() { 'use strict'; function foo(...restParam) { 'use strict'; } }"
-PASS Invalid: "function f() { function outer() { 'use strict'; function foo(...restParam) { 'use strict'; } } }"
-PASS Invalid: "function outer() { 'use strict'; function foo(a,b,c,...restParam) { 'use strict'; } }"
-PASS Invalid: "function f() { function outer() { 'use strict'; function foo(a,b,c,...restParam) { 'use strict'; } } }"
-PASS Invalid: "function outer() { 'use strict'; function foo(a = 20,b,c,...restParam) { 'use strict'; } }"
-PASS Invalid: "function f() { function outer() { 'use strict'; function foo(a = 20,b,c,...restParam) { 'use strict'; } } }"
-PASS Invalid: "function outer() { 'use strict'; function foo(a = 20,{b},c,...restParam) { 'use strict'; } }"
-PASS Invalid: "function f() { function outer() { 'use strict'; function foo(a = 20,{b},c,...restParam) { 'use strict'; } } }"
-PASS Invalid: "function outer() { 'use strict'; function foo(a = 20,{b},[c] = 5,...restParam) { 'use strict'; } }"
-PASS Invalid: "function f() { function outer() { 'use strict'; function foo(a = 20,{b},[c] = 5,...restParam) { 'use strict'; } } }"
-PASS Invalid: "function outer() { 'use strict'; function foo(a = 20) { 'use strict';} }"
-PASS Invalid: "function f() { function outer() { 'use strict'; function foo(a = 20) { 'use strict';} } }"
-PASS Invalid: "function outer() { 'use strict'; function foo(a,b,c,{d} = 20) { 'use strict'; } }"
-PASS Invalid: "function f() { function outer() { 'use strict'; function foo(a,b,c,{d} = 20) { 'use strict'; } } }"
</del><ins>+PASS Invalid: "function outer() { 'use strict'; function foo(...restParam) { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function outer() { 'use strict'; function foo(...restParam) { 'use strict'; } } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function outer() { 'use strict'; function foo(a,b,c,...restParam) { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function outer() { 'use strict'; function foo(a,b,c,...restParam) { 'use strict'; } } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function outer() { 'use strict'; function foo(a = 20,b,c,...restParam) { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function outer() { 'use strict'; function foo(a = 20,b,c,...restParam) { 'use strict'; } } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function outer() { 'use strict'; function foo(a = 20,{b},c,...restParam) { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function outer() { 'use strict'; function foo(a = 20,{b},c,...restParam) { 'use strict'; } } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function outer() { 'use strict'; function foo(a = 20,{b},[c] = 5,...restParam) { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function outer() { 'use strict'; function foo(a = 20,{b},[c] = 5,...restParam) { 'use strict'; } } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function outer() { 'use strict'; function foo(a = 20) { 'use strict';} }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function outer() { 'use strict'; function foo(a = 20) { 'use strict';} } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function outer() { 'use strict'; function foo(a,b,c,{d} = 20) { 'use strict'; } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
+PASS Invalid: "function f() { function outer() { 'use strict'; function foo(a,b,c,{d} = 20) { 'use strict'; } } }". Produced the following syntax error: "SyntaxError: 'use strict' directive not allowed inside a function with a non-simple parameter list."
</ins><span class="cx"> Arrow function
</span><span class="cx"> PASS Valid: "var x = (x) => x;"
</span><span class="cx"> PASS Valid: "function f() { var x = (x) => x; }"
</span><span class="lines">@@ -1358,26 +1358,26 @@
</span><span class="cx"> PASS Valid: "function f() { var x = foo => x => x => x => {x}; }"
</span><span class="cx"> PASS Valid: "var x = ([x = 25]) => x => x => ({x} = {});"
</span><span class="cx"> PASS Valid: "function f() { var x = ([x = 25]) => x => x => ({x} = {}); }"
</span><del>-PASS Invalid: "var x = foo => x => x => {x} => x;"
-PASS Invalid: "function f() { var x = foo => x => x => {x} => x; }"
-PASS Invalid: "var x = {x} = 20 => x;"
-PASS Invalid: "function f() { var x = {x} = 20 => x; }"
-PASS Invalid: "var x = [x] = 20 => x;"
-PASS Invalid: "function f() { var x = [x] = 20 => x; }"
-PASS Invalid: "var x = [x = 25] = 20 => x;"
-PASS Invalid: "function f() { var x = [x = 25] = 20 => x; }"
-PASS Invalid: "var x = ([x = 25]) =>;"
-PASS Invalid: "function f() { var x = ([x = 25]) =>; }"
-PASS Invalid: "var x = ([x = 25]) => x =>;"
-PASS Invalid: "function f() { var x = ([x = 25]) => x =>; }"
-PASS Invalid: "var x = ([x = 25]) => x => x =>;"
-PASS Invalid: "function f() { var x = ([x = 25]) => x => x =>; }"
-PASS Invalid: "var x = ([x = 25]) => x => x => {;"
-PASS Invalid: "function f() { var x = ([x = 25]) => x => x => {; }"
-PASS Invalid: "var x ==> x;"
-PASS Invalid: "function f() { var x ==> x; }"
-PASS Invalid: "var x = x ==> x;"
-PASS Invalid: "function f() { var x = x ==> x; }"
</del><ins>+PASS Invalid: "var x = foo => x => x => {x} => x;". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ';' after variable declaration."
+PASS Invalid: "function f() { var x = foo => x => x => {x} => x; }". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ';' after variable declaration."
+PASS Invalid: "var x = {x} = 20 => x;". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ';' after variable declaration."
+PASS Invalid: "function f() { var x = {x} = 20 => x; }". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ';' after variable declaration."
+PASS Invalid: "var x = [x] = 20 => x;". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ';' after variable declaration."
+PASS Invalid: "function f() { var x = [x] = 20 => x; }". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ';' after variable declaration."
+PASS Invalid: "var x = [x = 25] = 20 => x;". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ';' after variable declaration."
+PASS Invalid: "function f() { var x = [x = 25] = 20 => x; }". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ';' after variable declaration."
+PASS Invalid: "var x = ([x = 25]) =>;". Produced the following syntax error: "SyntaxError: Unexpected token ';'"
+PASS Invalid: "function f() { var x = ([x = 25]) =>; }". Produced the following syntax error: "SyntaxError: Unexpected token ';'"
+PASS Invalid: "var x = ([x = 25]) => x =>;". Produced the following syntax error: "SyntaxError: Unexpected token ';'"
+PASS Invalid: "function f() { var x = ([x = 25]) => x =>; }". Produced the following syntax error: "SyntaxError: Unexpected token ';'"
+PASS Invalid: "var x = ([x = 25]) => x => x =>;". Produced the following syntax error: "SyntaxError: Unexpected token ';'"
+PASS Invalid: "function f() { var x = ([x = 25]) => x => x =>; }". Produced the following syntax error: "SyntaxError: Unexpected token ';'"
+PASS Invalid: "var x = ([x = 25]) => x => x => {;". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "function f() { var x = ([x = 25]) => x => x => {; }". Produced the following syntax error: "SyntaxError: Unexpected end of script"
+PASS Invalid: "var x ==> x;". Produced the following syntax error: "SyntaxError: Unexpected token '=='. Expected ';' after variable declaration."
+PASS Invalid: "function f() { var x ==> x; }". Produced the following syntax error: "SyntaxError: Unexpected token '=='. Expected ';' after variable declaration."
+PASS Invalid: "var x = x ==> x;". Produced the following syntax error: "SyntaxError: Unexpected token '>'"
+PASS Invalid: "function f() { var x = x ==> x; }". Produced the following syntax error: "SyntaxError: Unexpected token '>'"
</ins><span class="cx"> PASS Valid: "foo((x) => x)" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { foo((x) => x) }"
</span><span class="cx"> PASS Valid: "foo((x, y, z) => x)" with ReferenceError
</span><span class="lines">@@ -1402,26 +1402,26 @@
</span><span class="cx"> PASS Valid: "function f() { foo(foo => x => x => x => {x}) }"
</span><span class="cx"> PASS Valid: "foo(([x = 25]) => x => x => ({x} = {}))" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { foo(([x = 25]) => x => x => ({x} = {})) }"
</span><del>-PASS Invalid: "foo(foo => x => x => {x} => x)"
-PASS Invalid: "function f() { foo(foo => x => x => {x} => x) }"
-PASS Invalid: "foo({x} = 20 => x)"
-PASS Invalid: "function f() { foo({x} = 20 => x) }"
-PASS Invalid: "foo([x] = 20 => x)"
-PASS Invalid: "function f() { foo([x] = 20 => x) }"
-PASS Invalid: "foo([x = 25] = 20 => x)"
-PASS Invalid: "function f() { foo([x = 25] = 20 => x) }"
-PASS Invalid: "foo(([x = 25]) =>)"
-PASS Invalid: "function f() { foo(([x = 25]) =>) }"
-PASS Invalid: "foo(([x = 25]) => x =>)"
-PASS Invalid: "function f() { foo(([x = 25]) => x =>) }"
-PASS Invalid: "foo(([x = 25]) => x => x =>)"
-PASS Invalid: "function f() { foo(([x = 25]) => x => x =>) }"
-PASS Invalid: "foo(([x = 25]) => x => x => {)"
-PASS Invalid: "function f() { foo(([x = 25]) => x => x => {) }"
-PASS Invalid: "foo(x ==> x)"
-PASS Invalid: "function f() { foo(x ==> x) }"
-PASS Invalid: "foo(x = x ==> x)"
-PASS Invalid: "function f() { foo(x = x ==> x) }"
</del><ins>+PASS Invalid: "foo(foo => x => x => {x} => x)". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ')' to end an argument list."
+PASS Invalid: "function f() { foo(foo => x => x => {x} => x) }". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ')' to end an argument list."
+PASS Invalid: "foo({x} = 20 => x)". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ')' to end an argument list."
+PASS Invalid: "function f() { foo({x} = 20 => x) }". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ')' to end an argument list."
+PASS Invalid: "foo([x] = 20 => x)". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ')' to end an argument list."
+PASS Invalid: "function f() { foo([x] = 20 => x) }". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ')' to end an argument list."
+PASS Invalid: "foo([x = 25] = 20 => x)". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ')' to end an argument list."
+PASS Invalid: "function f() { foo([x = 25] = 20 => x) }". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ')' to end an argument list."
+PASS Invalid: "foo(([x = 25]) =>)". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { foo(([x = 25]) =>) }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "foo(([x = 25]) => x =>)". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { foo(([x = 25]) => x =>) }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "foo(([x = 25]) => x => x =>)". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { foo(([x = 25]) => x => x =>) }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "foo(([x = 25]) => x => x => {)". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "function f() { foo(([x = 25]) => x => x => {) }". Produced the following syntax error: "SyntaxError: Unexpected token ')'"
+PASS Invalid: "foo(x ==> x)". Produced the following syntax error: "SyntaxError: Unexpected token '>'"
+PASS Invalid: "function f() { foo(x ==> x) }". Produced the following syntax error: "SyntaxError: Unexpected token '>'"
+PASS Invalid: "foo(x = x ==> x)". Produced the following syntax error: "SyntaxError: Unexpected token '>'"
+PASS Invalid: "function f() { foo(x = x ==> x) }". Produced the following syntax error: "SyntaxError: Unexpected token '>'"
</ins><span class="cx"> PASS Valid: "var f = cond ? ()=>20 : ()=>20" with ReferenceError
</span><span class="cx"> PASS Valid: "function f() { var f = cond ? ()=>20 : ()=>20 }"
</span><span class="cx"> PASS Valid: "var f = cond ? (x)=>{x} : ()=>20" with ReferenceError
</span><span class="lines">@@ -1442,14 +1442,14 @@
</span><span class="cx"> PASS Valid: "function f() { var f = cond ? x=>{x.foo } : x=>x + x + x + x + x + x + (x =>x) }"
</span><span class="cx"> PASS Valid: "var f = (x) => x => (x) => ({y}) => y"
</span><span class="cx"> PASS Valid: "function f() { var f = (x) => x => (x) => ({y}) => y }"
</span><del>-PASS Invalid: "var f = cond ? x=>x.foo; : x=>x + x + x + x + x + x + x"
-PASS Invalid: "function f() { var f = cond ? x=>x.foo; : x=>x + x + x + x + x + x + x }"
-PASS Invalid: "var f = cond ? x=>x.foo : : x=>x + x + x + x + x + x + x"
-PASS Invalid: "function f() { var f = cond ? x=>x.foo : : x=>x + x + x + x + x + x + x }"
-PASS Invalid: "var f = cond ? x=>{x.foo :} : x=>x + x + x + x + x + x + x"
-PASS Invalid: "function f() { var f = cond ? x=>{x.foo :} : x=>x + x + x + x + x + x + x }"
-PASS Invalid: "var f = cond ? x=>{x.foo } => : x=>x + x + x + x + x + x + x"
-PASS Invalid: "function f() { var f = cond ? x=>{x.foo } => : x=>x + x + x + x + x + x + x }"
</del><ins>+PASS Invalid: "var f = cond ? x=>x.foo; : x=>x + x + x + x + x + x + x". Produced the following syntax error: "SyntaxError: Unexpected token ';'. Expected ':' in ternary operator."
+PASS Invalid: "function f() { var f = cond ? x=>x.foo; : x=>x + x + x + x + x + x + x }". Produced the following syntax error: "SyntaxError: Unexpected token ';'. Expected ':' in ternary operator."
+PASS Invalid: "var f = cond ? x=>x.foo : : x=>x + x + x + x + x + x + x". Produced the following syntax error: "SyntaxError: Unexpected token ':'"
+PASS Invalid: "function f() { var f = cond ? x=>x.foo : : x=>x + x + x + x + x + x + x }". Produced the following syntax error: "SyntaxError: Unexpected token ':'"
+PASS Invalid: "var f = cond ? x=>{x.foo :} : x=>x + x + x + x + x + x + x". Produced the following syntax error: "SyntaxError: Unexpected token ':'"
+PASS Invalid: "function f() { var f = cond ? x=>{x.foo :} : x=>x + x + x + x + x + x + x }". Produced the following syntax error: "SyntaxError: Unexpected token ':'"
+PASS Invalid: "var f = cond ? x=>{x.foo } => : x=>x + x + x + x + x + x + x". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ':' in ternary operator."
+PASS Invalid: "function f() { var f = cond ? x=>{x.foo } => : x=>x + x + x + x + x + x + x }". Produced the following syntax error: "SyntaxError: Unexpected token '=>'. Expected ':' in ternary operator."
</ins><span class="cx"> PASS Valid: "class C { constructor() { this._x = 45; } get foo() { return this._x;} } class D extends C { x(y = () => super.foo) { return y(); } }"
</span><span class="cx"> PASS Valid: "function f() { class C { constructor() { this._x = 45; } get foo() { return this._x;} } class D extends C { x(y = () => super.foo) { return y(); } } }"
</span><span class="cx"> PASS Valid: "class C { constructor() { this._x = 45; } get foo() { return this._x;} } class D extends C { x(y = () => {return super.foo}) { return y(); } }"
</span><span class="lines">@@ -1465,10 +1465,10 @@
</span><span class="cx"> Weird things that used to crash.
</span><span class="cx"> PASS Invalid: "or ([[{break //(elseifo (a=0;a<2;a++)n=
</span><span class="cx"> [[{aFYY sga=
</span><del>- [[{a=Yth FunctionRY&=Ylet 'a'}V a"
</del><ins>+ [[{a=Yth FunctionRY&=Ylet 'a'}V a". Produced the following syntax error: "SyntaxError: Unexpected token '//'. Expected a ':' following the property name 'break'."
</ins><span class="cx"> PASS Invalid: "function f() { or ([[{break //(elseifo (a=0;a<2;a++)n=
</span><span class="cx"> [[{aFYY sga=
</span><del>- [[{a=Yth FunctionRY&=Ylet 'a'}V a }"
</del><ins>+ [[{a=Yth FunctionRY&=Ylet 'a'}V a }". Produced the following syntax error: "SyntaxError: Unexpected token '//'. Expected a ':' following the property name 'break'."
</ins><span class="cx"> PASS e.line is 1
</span><span class="cx"> PASS foo is 'PASS'
</span><span class="cx"> PASS bar is 'PASS'
</span></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsparsersyntaxcheckjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/script-tests/parser-syntax-check.js (206593 => 206594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/parser-syntax-check.js        2016-09-29 18:19:31 UTC (rev 206593)
+++ trunk/LayoutTests/js/script-tests/parser-syntax-check.js        2016-09-29 18:44:14 UTC (rev 206594)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx">
</span><span class="cx"> if (expectSyntaxError) {
</span><span class="cx"> if (error && error instanceof SyntaxError)
</span><del>- testPassed('Invalid: "' + _a + '"');
</del><ins>+ testPassed(`Invalid: "${_a}". Produced the following syntax error: "${error.toString()}"`);
</ins><span class="cx"> else if (error)
</span><span class="cx"> testFailed('Invalid: "' + _a + '" should throw SyntaxError but got ' + (error.name || error));
</span><span class="cx"> else
</span></span></pre>
</div>
</div>
</body>
</html>