Skip to content

Upper bound of uinteger is atypical #1394

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

Closed
michaelpj opened this issue Dec 17, 2021 · 3 comments
Closed

Upper bound of uinteger is atypical #1394

michaelpj opened this issue Dec 17, 2021 · 3 comments

Comments

@michaelpj
Copy link
Contributor

The normal maximum value of a 32-bit unsigned integer type is 2^32-1, but the specification states it to be 2^31-1 (the maximum value of a 32-bit signed integer type)

This makes it difficult to simply implement uinteger fields using a normal 32-bit unsigned integer value, and makes testing harder, since the maximum allowable value is not the maximum value of the type.

I believe this would be a simple change in the typescript implementation, since uinteger is just a range restriction of typescript's unbounded number type.

@michaelpj michaelpj changed the title Upper bound of uinteger is odd Upper bound of uinteger is atypical Dec 17, 2021
@dbaeumer
Copy link
Member

That is correct but it was decided to keep that number range the same as the debugger adapter protocol (see https://microsoft.github.io/debug-adapter-protocol/specification)

@michaelpj
Copy link
Contributor Author

Would it not be possible to change the DAP in the same way?

@dbaeumer
Copy link
Member

dbaeumer commented Jan 1, 2022

I think the swirl will be too big. But you could open an issue against DAP and see if they change it.

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