-
Notifications
You must be signed in to change notification settings - Fork 299
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
JSpecify: handle return types of method references in Java Generics #847
JSpecify: handle return types of method references in Java Generics #847
Conversation
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #847 +/- ##
=========================================
Coverage 86.86% 86.87%
- Complexity 1879 1880 +1
=========================================
Files 74 74
Lines 6196 6200 +4
Branches 1202 1202
=========================================
+ Hits 5382 5386 +4
Misses 406 406
Partials 408 408
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great start! Couple comments
@@ -439,6 +439,31 @@ public void testForMethodReferenceInAnAssignment() { | |||
.doTest(); | |||
} | |||
|
|||
@Test | |||
public void testForMethodReferenceReturnType() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As noted in an offline discussion, this test looks good but let's add tests for more (pseudo-)assignments, like passing a method reference as a function parameter and returning a method reference
…ter documentation
…abhijitk' into generic_types_method_ref_return_abhijitk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Adding new test case and the logic to handle the negative scenario of the test case where we were getting a false positive earlier.
All test cases in NullAwayJSpecifyGenericTests.java passed for these changes.