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

[Bug] Parser expects identifier when property name is "null" #666

Closed
jtenner opened this issue Jun 14, 2019 · 2 comments
Closed

[Bug] Parser expects identifier when property name is "null" #666

jtenner opened this issue Jun 14, 2019 · 2 comments

Comments

@jtenner
Copy link
Contributor

jtenner commented Jun 14, 2019

ERROR TS1003: Identifier expected.

     expect(JValue.null instanceof JNull).toBeTruthy("JValue.null should be instanecof JNull");
                   ~~~~

ERROR TS1003: Identifier expected.

   public static null: JNull = new JNull();

So, I know that null is a reserved keyword, but typically as an identifier, it's still valid in the right contexts.

Thoughts?

@MaxGraey
Copy link
Member

Yeah. This should compile:

class JValue {
  static get null(): i32 {
    return 0;
  }
  // or
  static null: i32 = 0
  // or
  null: i32
}

@dcodeIO
Copy link
Member

dcodeIO commented Jun 21, 2019

Should be fixed by the commit above!

@dcodeIO dcodeIO closed this as completed Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants