js/src/jit-test/tests/arrow-functions/construct-1.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:2abda455bb9d
1 // Arrow functions are not constructors.
2
3 load(libdir + "asserts.js");
4
5 var f = a => { this.a = a; };
6 assertThrowsInstanceOf(() => new f, TypeError);
7 assertThrowsInstanceOf(() => new f(1, 2), TypeError);

mercurial