summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/fields/private-eval-in-frame.js
blob: b0f2591e9854a0b50b8c1f77b121e2e036bd8bfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
load(libdir + 'asserts.js');
load(libdir + 'evalInFrame.js');

class B {
  #x = 12;
  x = 'his';
  ef(str) {
    return evalInFrame(0, str);
  }
}

var b = new B();
assertEq(b.ef(`this.x`), 'his');
assertEq(b.ef(`this.#x`), 12);