We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c0f9d2 commit 04beb27Copy full SHA for 04beb27
tests/jerry/private_fields.js
@@ -329,20 +329,24 @@ var16.b();
329
assert(var16.c() == 12);
330
331
// Private fields are accessible in Array object
332
-class C3 extends Array{
333
- #a=1;
334
- b(){
+class P extends Array {
+ #a = 1;
+ b() {
335
return this.#a;
336
- }
+ }
337
}
338
-var var17 = new C3();
339
-assert(var17.b()==1);
340
341
-class C4 extends Array{
342
- #a(){return 1};
343
+var var17 = new P();
+assert(var17.b() == 1);
+
+class Q extends Array {
+ #a() {
344
+ return 1;
345
346
347
return this.#a();
348
349
-var var18 = new C4();
-assert(var18.b()==1);
350
351
+var var18 = new Q();
352
+assert(var18.b() == 1);
0 commit comments