https://bugs.webkit.org/show_bug.cgi?id=144278
Reviewed by Darin Adler.
Fixed the test. The constructors of two distinct classes should definitely be distinct.
* js/class-syntax-default-constructor-expected.txt:
* js/script-tests/class-syntax-default-constructor.js:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183758
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-05-04 Ryosuke Niwa <rniwa@webkit.org>
+
+ ES6 classes: Invalid test for constructor property
+ https://bugs.webkit.org/show_bug.cgi?id=144278
+
+ Reviewed by Darin Adler.
+
+ Fixed the test. The constructors of two distinct classes should definitely be distinct.
+
+ * js/class-syntax-default-constructor-expected.txt:
+ * js/script-tests/class-syntax-default-constructor.js:
+
2015-05-04 Ryosuke Niwa <rniwa@webkit.org>
new super should be a syntax error
PASS B() threw exception TypeError: Cannot call a class constructor.
PASS B.prototype.constructor.name is "B"
PASS A !== B is true
-FAIL A.prototype.constructor should be function B() { super(...arguments); }. Was function A() { }.
+PASS A.prototype.constructor is not B.prototype.constructor
PASS new (class extends (class { constructor(a, b) { return [a, b]; } }) {})(1, 2) is [1, 2]
PASS successfullyParsed is true
shouldThrow('B()', '"TypeError: Cannot call a class constructor"');
shouldBe('B.prototype.constructor.name', '"B"');
shouldBeTrue('A !== B');
-shouldBe('A.prototype.constructor', 'B.prototype.constructor');
+shouldNotBe('A.prototype.constructor', 'B.prototype.constructor');
shouldBe('new (class extends (class { constructor(a, b) { return [a, b]; } }) {})(1, 2)', '[1, 2]');
var successfullyParsed = true;