Skip to content

compiler: fix non-int integer constants #1543

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

Merged
merged 1 commit into from
Dec 27, 2020
Merged

compiler: fix non-int integer constants #1543

merged 1 commit into from
Dec 27, 2020

Conversation

aykevl
Copy link
Member

@aykevl aykevl commented Dec 23, 2020

Before this change, the compiler could panic with the following message:

panic: 20 not an Int

That of course doesn't make much sense. But it apparently is expected behavior, see golang/go#43165 for details.

This commit fixes this issue by converting the constant to an integer if needed.

Before this change, the compiler could panic with the following message:

    panic: 20 not an Int

That of course doesn't make much sense. But it apparently is expected
behavior, see golang/go#43165 for details.

This commit fixes this issue by converting the constant to an integer if
needed.
@deadprogram
Copy link
Member

deadprogram commented Dec 27, 2020

For sure an odd feature. Merging for the sake of language compatibility.

@deadprogram deadprogram merged commit fb0bb69 into dev Dec 27, 2020
@deadprogram deadprogram deleted the fix-const-int branch December 27, 2020 15:13
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

Successfully merging this pull request may close these issues.

2 participants