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

Side by Side Diff: test/mjsunit/strong/declaration-after-use.js

Issue 1218543003: [es6] Ensure that for-in/of loops have a proper TDZ for their boundnames (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « test/mjsunit/harmony/destructuring.js ('k') | test/test262-es6/test262-es6.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --strong-mode --harmony-rest-parameters --harmony-arrow-functions 5 // Flags: --strong-mode --harmony-rest-parameters --harmony-arrow-functions
6 // Flags: --harmony-computed-property-names 6 // Flags: --harmony-computed-property-names
7 7
8 // Note that it's essential for these tests that the reference is inside dead 8 // Note that it's essential for these tests that the reference is inside dead
9 // code (because we already produce ReferenceErrors for run-time unresolved 9 // code (because we already produce ReferenceErrors for run-time unresolved
10 // variables and don't want to confuse those with strong mode errors). But the 10 // variables and don't want to confuse those with strong mode errors). But the
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 186 }
187 187
188 let var5 = 5; 188 let var5 = 5;
189 for (; var5 < 10; ++var5) { } 189 for (; var5 < 10; ++var5) { }
190 190
191 let arr = [1, 2]; 191 let arr = [1, 2];
192 for (let i of arr) { 192 for (let i of arr) {
193 i; 193 i;
194 } 194 }
195 195
196 let var6 = [1, 2];
197 // The second var6 resolves to outside (not to the first var6).
198 for (let var6 of var6) { var6; }
199
200 try { 196 try {
201 throw "error"; 197 throw "error";
202 } catch (e) { 198 } catch (e) {
203 e; 199 e;
204 } 200 }
205 201
206 function func1() { func1; this; } 202 function func1() { func1; this; }
207 func1(); 203 func1();
208 func1; 204 func1;
209 205
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 247 }
252 return new CInner(); 248 return new CInner();
253 } 249 }
254 } 250 }
255 (new COuter()).m().n(); 251 (new COuter()).m().n();
256 252
257 // Making sure the check which is supposed to prevent "object literal inside 253 // Making sure the check which is supposed to prevent "object literal inside
258 // computed property name references the class name" is not too generic: 254 // computed property name references the class name" is not too generic:
259 class C14 { m() { let obj = { n() { C14 } }; obj.n(); } }; (new C14()).m(); 255 class C14 { m() { let obj = { n() { C14 } }; obj.n(); } }; (new C14()).m();
260 })(); 256 })();
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/destructuring.js ('k') | test/test262-es6/test262-es6.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698