File tree Expand file tree Collapse file tree
nullaway/src/test/java/com/uber/nullaway/jspecify Expand file tree Collapse file tree Original file line number Diff line number Diff 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) {" ,
You can’t perform that action at this time.
0 commit comments