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 with hex int literal with contextually expected type of float or decimal #860

Closed
jclark opened this issue Jan 17, 2022 · 3 comments · Fixed by #894
Closed

Bug with hex int literal with contextually expected type of float or decimal #860

jclark opened this issue Jan 17, 2022 · 3 comments · Fixed by #894
Assignees
Labels
in progress Currently being implemented Type/Bug Something isn't working
Milestone

Comments

@jclark
Copy link
Contributor

jclark commented Jan 17, 2022

The code appears to ignore the base of an integer literal when the contextually expected type is float or decimal.

@jclark jclark added this to the Subset 13 milestone Jan 17, 2022
@jclark jclark added the Type/Bug Something isn't working label Jan 17, 2022
@jclark
Copy link
Contributor Author

jclark commented Jan 18, 2022

There's a spec issue here: ballerina-platform/ballerina-spec#1024

@jclark
Copy link
Contributor Author

jclark commented Feb 2, 2022

For now we should disallow decimal d = 0x1234; as proposed in

ballerina-platform/ballerina-spec#1024 (comment)

@jclark
Copy link
Contributor Author

jclark commented Feb 4, 2022

This needs some further cleanup.

@jclark jclark reopened this Feb 4, 2022
@jclark jclark closed this as completed in bc502c1 Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress Currently being implemented Type/Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants