| Index: test/mjsunit/harmony/class-privates-proxy.js
|
| diff --git a/test/mjsunit/harmony/class-privates-proxy.js b/test/mjsunit/harmony/class-privates-proxy.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8118a6da83c6a0a849b448d0455238dca18a9830
|
| --- /dev/null
|
| +++ b/test/mjsunit/harmony/class-privates-proxy.js
|
| @@ -0,0 +1,36 @@
|
| +// Copyright 2016 the V8 project authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// Flags: --harmony-private-class-fields
|
| +
|
| +var handler = {
|
| + getPrototypeOf(){ throw 'Called getPrototypeOf'; },
|
| + setPrototypeOf(){ throw 'Called setPrototypeOf'; },
|
| + isExtensible(){ throw 'Called isExtensible'; },
|
| + preventExtensions(){ throw 'Called preventExtensions'; },
|
| + getOwnPropertyDescriptor(){ throw 'Called getOwnPropertyDescriptor'; },
|
| + defineProperty(){ throw 'Called defineProperty'; },
|
| + has(){ throw 'Called has'; },
|
| + get(){ throw 'Called get'; },
|
| + set(){ throw 'Called set'; },
|
| + deleteProperty(){ throw 'Called deleteProperty'; },
|
| + ownKeys(){ throw 'Called ownKeys'; },
|
| + apply(){ throw 'Called apply'; },
|
| + construct(){ throw 'Called construct'; }
|
| +};
|
| +
|
| +{
|
| + class Base {
|
| + constructor() {
|
| + return new Proxy({}, handler);
|
| + }
|
| + }
|
| +
|
| + class Derived extends Base {
|
| + #x = 0;
|
| + static m(o){ return o.#x; }
|
| + }
|
| +
|
| + assertEquals(0, Derived.m(new Derived));
|
| +}
|
|
|