Skip to content

Commit 0aaa4a6

Browse files
committed
more testing
1 parent 1ec91df commit 0aaa4a6

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

nullaway/src/test/java/com/uber/nullaway/jspecify/GenericMethodTests.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,6 @@ public void firstOrDefaultSelfContained() {
773773
.doTest();
774774
}
775775

776-
@Ignore("need better support for generics inference combined with local vars")
777776
@Test
778777
public void firstOrDefaultLocalVarParam() {
779778
makeHelper()
@@ -831,6 +830,16 @@ public void testLocalsRefined() {
831830
" // BUG: Diagnostic contains: Failed to infer type argument nullability",
832831
" field = id(s);",
833832
" }",
833+
" @Nullable String field2 = null;",
834+
" void testField2() {",
835+
" String s = null;",
836+
" field2 = id(s);",
837+
" // BUG: Diagnostic contains: dereferenced expression field2 is @Nullable",
838+
" field2.hashCode();",
839+
" s = \"hello\";",
840+
" field2 = id(s);",
841+
" field2.hashCode();",
842+
" }",
834843
" void testLoop() {",
835844
" String s = \"hello\";",
836845
" while (true) {",

0 commit comments

Comments
 (0)