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

Side by Side Diff: test/mjsunit/harmony/class-privates-proxy.js

Issue 2329703002: Private fields
Patch Set: some comments 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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-private-class-fields
6
7 var handler = {
8 getPrototypeOf(){ throw 'Called getPrototypeOf'; },
9 setPrototypeOf(){ throw 'Called setPrototypeOf'; },
10 isExtensible(){ throw 'Called isExtensible'; },
11 preventExtensions(){ throw 'Called preventExtensions'; },
12 getOwnPropertyDescriptor(){ throw 'Called getOwnPropertyDescriptor'; },
13 defineProperty(){ throw 'Called defineProperty'; },
14 has(){ throw 'Called has'; },
15 get(){ throw 'Called get'; },
16 set(){ throw 'Called set'; },
17 deleteProperty(){ throw 'Called deleteProperty'; },
18 ownKeys(){ throw 'Called ownKeys'; },
19 apply(){ throw 'Called apply'; },
20 construct(){ throw 'Called construct'; }
21 };
22
23 {
24 class Base {
25 constructor() {
26 return new Proxy({}, handler);
27 }
28 }
29
30 class Derived extends Base {
31 #x = 0;
32 static m(o){ return o.#x; }
33 }
34
35 assertEquals(0, Derived.m(new Derived));
36 }
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/class-privates-evaluation-order.js ('k') | test/mjsunit/harmony/class-privates-scoping.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698