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

Unified Diff: test/mjsunit/es6/block-sloppy-function.js

Issue 2301183003: Move sloppy block function hoisting logic from Parser to Scope. (Closed)
Patch Set: code review (nikolaos@) Created 4 years, 3 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
« no previous file with comments | « src/parsing/pattern-rewriter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/block-sloppy-function.js
diff --git a/test/mjsunit/es6/block-sloppy-function.js b/test/mjsunit/es6/block-sloppy-function.js
index 8cb9a4deda80f4d822818caade60b6cbf1dbe7a4..2cdcbce3d61a9875ba080556b441a6cc59d8b3b9 100644
--- a/test/mjsunit/es6/block-sloppy-function.js
+++ b/test/mjsunit/es6/block-sloppy-function.js
@@ -67,6 +67,24 @@
assertEquals(1, f);
})();
+(function shadowingLetDoesntBindGenerator() {
+ let f = function *f() {
+ while(true) {
+ yield 1;
+ }
+ };
+ assertEquals(1, f().next().value);
+ {
+ function *f() {
+ while(true) {
+ yield 2;
+ }
+ }
+ assertEquals(2, f().next().value);
+ }
+ assertEquals(1, f().next().value);
+})();
+
(function shadowingClassDoesntBind() {
class f { }
assertEquals('class f { }', f.toString());
« no previous file with comments | « src/parsing/pattern-rewriter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698