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

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

Issue 2348783002: [AST] Add method to concatenate AstRawStrings (Closed)
Patch Set: use ConcatString 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 side-by-side diff with in-line comments
Download patch
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));
+}
« 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