| Index: test/mjsunit/harmony/classes-experimental.js
|
| diff --git a/test/mjsunit/harmony/classes-experimental.js b/test/mjsunit/harmony/classes-experimental.js
|
| index 5a3c3e5558319941e0098dabdc712ebfd1be0e93..ed720d97b6275462e397d3f55e81746a450839f1 100644
|
| --- a/test/mjsunit/harmony/classes-experimental.js
|
| +++ b/test/mjsunit/harmony/classes-experimental.js
|
| @@ -34,15 +34,18 @@ class Subclass extends Base {
|
| let b = new Base(1, 2);
|
| assertSame(3, b.prp);
|
|
|
| +
|
| let s = new Subclass(2, -1);
|
| assertSame(1, s.prp);
|
| assertSame(undefined, s.prp1);
|
| assertFalse(s.hasOwnProperty("prp1"));
|
|
|
| class Subclass2 extends Base {
|
| - constructor() {
|
| + constructor(x) {
|
| super(1,2);
|
|
|
| + if (x < 0) return;
|
| +
|
| let called = false;
|
| function tmp() { called = true; return 3; }
|
| var exn = null;
|
| @@ -54,4 +57,11 @@ class Subclass2 extends Base {
|
| }
|
| }
|
|
|
| -new Subclass2();
|
| +var s2 = new Subclass2(1);
|
| +assertSame(3, s2.prp);
|
| +
|
| +var s3 = new Subclass2(-1);
|
| +assertSame(3, s3.prp);
|
| +
|
| +assertThrows(function() { Subclass.call(new Object(), 1, 2); }, TypeError);
|
| +assertThrows(function() { Base.call(new Object(), 1, 2); }, TypeError);
|
|
|