summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/class/superPropBasicNew.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/non262/class/superPropBasicNew.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/tests/non262/class/superPropBasicNew.js b/js/src/tests/non262/class/superPropBasicNew.js
new file mode 100644
index 0000000000..e1ca9b4ae1
--- /dev/null
+++ b/js/src/tests/non262/class/superPropBasicNew.js
@@ -0,0 +1,17 @@
+class Base {
+ constructor() {}
+}
+class Mid extends Base {
+ constructor() { super(); }
+ f() { return new super.constructor(); }
+}
+class Derived extends Mid {
+ constructor() { super(); }
+}
+
+let d = new Derived();
+var df = d.f();
+assertEq(df.constructor, Base);
+
+if (typeof reportCompare === 'function')
+ reportCompare(0,0,"OK");