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

Side by Side Diff: test/mjsunit/es6/new-target.js

Issue 1519073004: Remove always-on --harmony-rest-parameters flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
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: --harmony-reflect --harmony-destructuring-bind --harmony-rest-paramete rs 5 // Flags: --harmony-reflect --harmony-destructuring-bind
6 6
7 7
8 (function TestClass() { 8 (function TestClass() {
9 'use strict'; 9 'use strict';
10 10
11 var calls = 0; 11 var calls = 0;
12 class Base { 12 class Base {
13 constructor(_) { 13 constructor(_) {
14 assertEquals(Base, new.target); 14 assertEquals(Base, new.target);
15 calls++; 15 calls++;
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 (function TestEarlyErrors() { 405 (function TestEarlyErrors() {
406 assertThrows(function() { Function("new.target = 42"); }, ReferenceError); 406 assertThrows(function() { Function("new.target = 42"); }, ReferenceError);
407 assertThrows(function() { Function("var foo = 1; new.target = foo = 42"); }, R eferenceError); 407 assertThrows(function() { Function("var foo = 1; new.target = foo = 42"); }, R eferenceError);
408 assertThrows(function() { Function("var foo = 1; foo = new.target = 42"); }, R eferenceError); 408 assertThrows(function() { Function("var foo = 1; foo = new.target = 42"); }, R eferenceError);
409 assertThrows(function() { Function("new.target--"); }, ReferenceError); 409 assertThrows(function() { Function("new.target--"); }, ReferenceError);
410 assertThrows(function() { Function("--new.target"); }, ReferenceError); 410 assertThrows(function() { Function("--new.target"); }, ReferenceError);
411 assertThrows(function() { Function("(new.target)++"); }, ReferenceError); 411 assertThrows(function() { Function("(new.target)++"); }, ReferenceError);
412 assertThrows(function() { Function("++(new.target)"); }, ReferenceError); 412 assertThrows(function() { Function("++(new.target)"); }, ReferenceError);
413 assertThrows(function() { Function("for (new.target of {});"); }, SyntaxError) ; 413 assertThrows(function() { Function("for (new.target of {});"); }, SyntaxError) ;
414 })(); 414 })();
OLDNEW
« no previous file with comments | « test/mjsunit/es6/arrow-rest-params-lazy-parsing.js ('k') | test/mjsunit/es6/regress/regress-4211.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698