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()); |