Repository navigation
Unbox wrapper-bounded type variables during numeric promotion; fixes #8328 #8329
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
Open
msridhar
wants to merge
23
commits into
typetools:master
Choose a base branch
from
msridhar:fix-8328-unboxing
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+283
−75
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
550d087
Unbox wrapper-bounded type variables during numeric promotion; fixes …
msridhar e85c590
spotless
msridhar 1f95233
don't update changelog
msridhar 4b33d17
Build unboxing calls for wrapper-bounded type variables
msridhar b0b8248
Avoid static imports in the unboxing CFG test
msridhar 954f4a9
remove test
msridhar 9e62262
improve comment
msridhar 03c1f42
Unbox wrapper-bounded type variables in more CFG contexts
mernst 3abf339
Merge pull request #78 from mernst/fix-8328-unboxing-fixes
msridhar b98a79d
Add tests for compound boolean assignment and array dimension with ty…
mernst f4e0079
Move unboxing helpers to TypesUtils and use them at every unboxing site
mernst 2111b3b
Merge pull request #79 from mernst/fix-8328-unboxing-crash-tests
msridhar 6bcf3e9
Merge branch 'master' into fix-8328-unboxing
msridhar 3b4da02
Merge branch 'master' into fix-8328-unboxing
msridhar 7a1bb8a
fixes
msridhar 6dc5012
new test
msridhar ee71fac
Merge branch 'master' into fix-8328-unboxing
msridhar 4ae2182
fix another value checker crash
msridhar 97d8401
Revert the Units and Value effective-annotation fixes
smillst 685297a
Use TypesUtils.isUnboxable and unboxedTypeOrSelf in CFGTranslationPha…
smillst 4c153a4
Revert the Value Checker argument-conversion fix
smillst 7ec455a
Merge branch 'master' into fix-8328-unboxing
smillst 7ff26a4
Merge branch 'master' into fix-8328-unboxing
smillst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import org.checkerframework.checker.nullness.qual.Nullable; | ||
|
|
||
| // @below-java21-jdk-skip-test | ||
|
|
||
| // None of the WPI formats supports the new Java 21 languages features, so skip inference until they | ||
| // do. | ||
| // @infer-jaifs-skip-test | ||
| // @infer-ajava-skip-test | ||
| // @infer-stubs-skip-test | ||
| public class TypeVarSwitchSelector { | ||
|
|
||
| // A switch over a selector whose type is a type variable is a pattern switch, so the selector is | ||
| // not unboxed and the `case null` branch is reachable. | ||
| <T extends @Nullable Integer> String patternSwitch(T t) { | ||
| return switch (t) { | ||
| // :: error: [dereference.of.nullable] | ||
| case null -> t.toString(); | ||
| case Integer i -> i.toString(); | ||
| }; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.