summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/object/method-non-constructor.js
blob: fd1d589b97e2bc3d26d61544859b7c0c909eb276 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
var obj = { method() { } };
assertThrowsInstanceOf(() => {
    new obj.method;
}, TypeError);

obj = { constructor() { } };
assertThrowsInstanceOf(() => {
    new obj.constructor;
}, TypeError);

if (typeof reportCompare === "function")
    reportCompare(true, true);