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

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

Issue 949763003: WIP: new.target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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
« src/scopes.cc ('K') | « test/cctest/test-parsing.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Flags: --harmony-classes --harmony-new-target
6
7 'use strict';
8
9 (function TestBasics() {
10 var calls = 0;
11 class Base {}
12 class Derived extends Base {
13 constructor(expected) {
14 super();
15 assertEquals(expected, new.target);
16 calls++;
17 }
18 }
19 new Derived(Derived);
20 assertEquals(1, calls);
21
22 class Derived2 extends Derived {}
23 calls = 0;
24 new Derived2(Derived2);
25 assertEquals(1, calls);
26 })();
OLDNEW
« src/scopes.cc ('K') | « test/cctest/test-parsing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698