summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/class/superPropEvalInsideNested.js
blob: 04cdab049963d88904f4024c7bfcafdc67b9ee13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// It's invalid to eval super.prop inside a nested non-method, even if it
// appears inside a method definition
assertThrowsInstanceOf(() =>
({
    method() {
        (function () {
            eval('super.toString');
        })();
    }
}).method(), SyntaxError);

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