summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Class/derivedConstructorTDZReturnUndefined.js
blob: ab31b7aedd2aa8debb46746538034ef1111a8bb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
class foo extends null {
    constructor() {
        // Explicit returns of undefined should act the same as falling off the
        // end of the function. That is to say, they should throw.
        return undefined;
    }
}

for (let i = 0; i < 1100; i++)
    assertThrownErrorContains(() => new foo(), "|this|");

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