summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Class/superCallIllegal.js
blob: 8b7b36397d17bb524d50e3c32be3014cb2c1f6d5 (plain)
1
2
3
4
5
6
7
// super() invalid outside derived class constructors, including in dynamic
// functions and eval
assertThrowsInstanceOf(() => new Function("super();"), SyntaxError);
assertThrowsInstanceOf(() => eval("super()"), SyntaxError);

if (typeof reportCompare === 'function')
    reportCompare(0,0,"OK");