summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/PrivateName/proxy-1.js
blob: 21f8f0ef080a975d0529a894f253c0db5e344563 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// |reftest| 

class A {
  #x = 10;
  g() {
    return this.#x;
  }
};

var p = new Proxy(new A, {});
var completed = false;
try {
  p.g();
  completed = true;
} catch (e) {
  assertEq(e instanceof TypeError, true);
}
assertEq(completed, false);


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