JSpecify: assume NONNULL in generic method inference for unconstrained type variables#1471
JSpecify: assume NONNULL in generic method inference for unconstrained type variables#1471
Conversation
|
@agrieve is there any way you could test this fixes the issue for Chromium using a snapshot build? |
WalkthroughThe PR changes generic type-variable inference in GenericsChecks.java to copy the solver result into a mutable HashMap, then iterates the method's type parameters and inserts a Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@nullaway/src/test/java/com/uber/nullaway/jspecify/GenericMethodTests.java`:
- Around line 1536-1547: Remove the unused import of
org.jetbrains.annotations.Contract from the test source where the NullUtil class
and assumeNonNull method are defined; locate the import line in the
NullUtil.java test snippet and delete the Contract import so only the necessary
imports (org.jspecify.annotations.NullMarked and
org.jspecify.annotations.Nullable) remain.
nullaway/src/test/java/com/uber/nullaway/jspecify/GenericMethodTests.java
Show resolved
Hide resolved
…dTests.java Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1471 +/- ##
============================================
+ Coverage 88.48% 88.49% +0.01%
- Complexity 2723 2725 +2
============================================
Files 99 99
Lines 9073 9076 +3
Branches 1812 1813 +1
============================================
+ Hits 8028 8032 +4
Misses 518 518
+ Partials 527 526 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixes #1453
I think a change in 0.13.0 made it more important that we have some solution for all type variables of a method.
Summary by CodeRabbit
Bug Fixes
Tests