-
Notifications
You must be signed in to change notification settings - Fork 59
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
Hex integer literals with decimal #1024
Comments
Note that |
From an implementation perspective, I am not enthusiastic about allowing We definitely don't want to support literals with hexadecimal exponents for decimal, which means we shouldn't support hexadecimal literals with a |
It does not seem consistent to me to allow
@hasithaa Do you agree? |
Both int and float has |
@manuranga Previous comments explain that. |
At the moment:
decimal x = 0x1234;
is OK, butdecimal:fromString("0x1234")
gives an errorThis is inconsistent: they should both be allowed or not allowed.
The spec also says that
decimal:fromString("1234")
should be an error, but that is clearly wrong (and jBallerina allows it).The text was updated successfully, but these errors were encountered: