Commit 7b64688
authored
Add a case in our inference for generic method calls (uber#1240)
Fixes uber#1238
Before we were missing a fallback case; now we just use the type of the
expression computed by `javac` (to be improved in the future).
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved handling of nullable type variables in generic methods to
ensure correct type inference in assignment contexts.
* **Tests**
* Added a new test to verify correct behavior when assigning
non-nullable arrays to nullable array parameters in generic methods.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 92c9304 commit 7b64688
File tree
2 files changed
+41
-0
lines changed- nullaway/src
- main/java/com/uber/nullaway/generics
- test/java/com/uber/nullaway/jspecify
2 files changed
+41
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
517 | 521 | | |
518 | 522 | | |
519 | 523 | | |
| |||
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
741 | 778 | | |
742 | 779 | | |
743 | 780 | | |
| |||
0 commit comments