Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

private field identifier encoding causing parse error #222

Open
jdalton opened this issue Aug 19, 2022 · 1 comment
Open

private field identifier encoding causing parse error #222

jdalton opened this issue Aug 19, 2022 · 1 comment

Comments

@jdalton
Copy link

jdalton commented Aug 19, 2022

Test 262 test related fail

/* Generated from: /test/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-u2118.js */
staticPrivateEscapeSequenceU2118: {
  var stringSet;
  class C {
    static get #\u2118() { return 'get string'; }
    static set #\u2118(param) { stringSet = param; }
    static getPrivateReference() {
      return this.#;
    }
    static setPrivateReference(value) {
      this.# = value;
    }
  }
  assert.sameValue(C.getPrivateReference(), 'get string');
  C.setPrivateReference('set string');
  assert.sameValue(stringSet, 'set string');
}

and

staticPrivateEscapeSequenceU6F: {
  var stringSet;
  class C {
    static get #\u{6F}() { return 'get string'; }
    static set #\u{6F}(param) { stringSet = param; }
    static getPrivateReference() {
      return this.#o;
    }
    static setPrivateReference(value) {
      this.#o = value;
    }
  }
  assert.sameValue(C.getPrivateReference(), 'get string');
  C.setPrivateReference('set string');
  assert.sameValue(stringSet, 'set string');
}

incorrectly throws:
[9:16]: Invalid key token

@3cp
Copy link
Member

3cp commented Aug 19, 2022

Yet to be implemented. #214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants