| //@ requireOptions("--usePrivateClassFields=1") |
| // GetPrivateName should throw when the receiver does not have the requested private property |
| constructor() { if (i === 30) return { [Symbol.toStringTag]: "without #x"}; } |
| static x(obj) { return obj.#x; } |
| get [Symbol.toStringTag]() { return "with #x"; } |
| for (i = 0; i < 50; ++i) { |
| throw new Error(`Expected C.x(${c}) to be ${i}, but found ${result}`); |
| if (i !== 30 || e.constructor !== TypeError) { |
| throw new Error("Expected TypeError, but no exception was thrown"); |