summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/fields/bug1683784.js
blob: c496bd0e5b0fa767505e7702d83bfd5a4e222bad (plain)
1
2
3
4
5
6
7
8
9
10
class C {
  #x() { }
  constructor() { this.#x = 1; }
}

try {
  new C
} catch (e) {
  assertEq(e.message, "cannot assign to private method");
}