summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Class/superPropDVG.js
blob: f187cb6ea15d47a891545c6c88a6fa6b985c9672 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Super property accesses should play nice with the pretty printer.
class testNonExistent {
    constructor() {
        super["prop"]();
    }
}
// Should fold to super.prop
assertThrownErrorContains(() => new testNonExistent(), 'super.prop');

var ol = { testNonExistent() { super.prop(); } };
assertThrownErrorContains(() => ol.testNonExistent(), "super.prop");

var olElem = { testNonExistent() { var prop = "prop"; super[prop](); } };
assertThrownErrorContains(() => olElem.testNonExistent(), "super[prop]");

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