summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/assign-primitive-proxy-class-error.js
blob: a861c00c362d10fcae97e9e0c37dc6b679be67f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
'use strict';

load(libdir + 'asserts.js');

let hook = {}
let Base = function() {}
Base.prototype = new Proxy(Base.prototype, hook);
class Derived extends Base {
    testPrimitiveReceiver() {
        super.foo = "Derived";
    }
}
assertTypeErrorMessage(() => Derived.prototype.testPrimitiveReceiver.call(null),
                       `can't assign to property "foo" on ({}): not an object`)