Bug 1587574 - Add test for fieldInitializers lookup r=jorendorff
authorMatthew Gaudet <mgaudet@mozilla.com>
Thu, 07 Nov 2019 18:13:48 +0000
changeset 501158 e9fdfcb12590a9c93ec2b98b3c29e3eb759a429f
parent 501157 e348521419d6dbe43d88bb6814fe8de94121b495
child 501159 497690887467ccf0709d71fdb1b20d0647388df9
push id114168
push userdluca@mozilla.com
push dateSun, 10 Nov 2019 03:08:55 +0000
treeherdermozilla-inbound@33f64c1ef3e4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1587574
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1587574 - Add test for fieldInitializers lookup r=jorendorff Differential Revision: https://phabricator.services.mozilla.com/D48756
js/src/tests/non262/fields/bug1580246.js
new file mode 100644
--- /dev/null
+++ b/js/src/tests/non262/fields/bug1580246.js
@@ -0,0 +1,14 @@
+// Don't Crash
+var testStr = `
+class C extends Object {
+  constructor() {
+    eval(\`a => b => {
+      class Q { f = 1; }  // inhibits lazy parsing
+      super();
+    }\`);
+  }
+}
+new C;`
+assertEq(raisesException(ReferenceError)(testStr), true);
+
+reportCompare(true, true);