Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(563)

Unified Diff: test/mjsunit/regress/regress-4577.js

Issue 2290753003: Allow lexically declared "arguments" in function scope in sloppy mode. (Closed)
Patch Set: update Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« test/cctest/test-parsing.cc ('K') | « test/mjsunit/bugs/bug-4577.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-4577.js
diff --git a/test/mjsunit/bugs/bug-4577.js b/test/mjsunit/regress/regress-4577.js
similarity index 67%
rename from test/mjsunit/bugs/bug-4577.js
rename to test/mjsunit/regress/regress-4577.js
index de2f843965de8f0da6244334e722194a4353008f..dc2fde4c99d284479b37d6a2e49e7581dcbd4f58 100644
--- a/test/mjsunit/bugs/bug-4577.js
+++ b/test/mjsunit/regress/regress-4577.js
@@ -11,3 +11,14 @@ function g({arguments}) {
return arguments === 42;
}
assertTrue(g({arguments: 42}));
+
+function foo() {
+ let arguments = 2;
+ return arguments;
+}
+assertEquals(2, foo());
+
+function bar(x = arguments, arguments) {
+ return x;
+}
+assertThrows(bar());
« test/cctest/test-parsing.cc ('K') | « test/mjsunit/bugs/bug-4577.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698