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

All primitive types are @Interned #6865

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

Calvin-L
Copy link
Contributor

Fixes #6371.

The interning checker does not apply @Interned to every occurrence of every primitive type. This allows some language constructs to fabricate non-interned primitive values, leading to false positives.

For instance, in the new loopVariables test, the loop variable i was assigned the type @UnknownInterned long. Thus i could not be used as an argument to addExact which requires interned arguments.

Fixes typetools#6371.

The interning checker does not apply `@Interned` to every occurrence of
every primitive type.  This allows some language constructs to
fabricate non-interned primitive values, leading to false positives.

For instance, in the new `loopVariables` test, the loop variable `i`
was assigned the type `@UnknownInterned long`.  Thus `i` could not be
used as an argument to `addExact` which requires interned arguments.
Copy link
Member

@mernst mernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mernst mernst enabled auto-merge (squash) October 15, 2024 15:33
@mernst mernst merged commit 41ccedf into typetools:master Oct 15, 2024
36 checks passed
@Calvin-L Calvin-L deleted the fix-interning-autounboxing-loops branch October 15, 2024 17:06
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.

Spurious interning error in for-each loop: "found long, required @Interned long"
2 participants