summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/PrivateName/read-private-eval.js
blob: 1f96f2ac5cd58fbbc085daabff53107f7c2f3637 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// |reftest| shell-option(--enable-private-fields) skip-if(!xulRuntime.shell) -- requires shell-option

class A {
  #x = 14;
  g() {
    return eval('this.#x');
  }
}

a = new A;
assertEq(a.g(), 14);

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