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

Clarification on integers and enums #1900

Open
IsaacShelton opened this issue Feb 13, 2024 · 1 comment
Open

Clarification on integers and enums #1900

IsaacShelton opened this issue Feb 13, 2024 · 1 comment
Milestone

Comments

@IsaacShelton
Copy link

As the language server protocol is based on JSON, is 1.0 valid for an integer or enum value?

@dbaeumer
Copy link
Member

1.0 is valid for JS code since Number.isInteger(1.0) is true. In C int x = 1.0 is also valid. However I would argue to not use them since this might not be honored correctly in all languages.

@dbaeumer dbaeumer added this to the On Deck milestone Feb 14, 2024
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
@dbaeumer @IsaacShelton and others