File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
nullaway/src/test/java/com/uber/nullaway/jspecify Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -2342,6 +2342,50 @@ public void callWithConstructorReceiver() {
23422342 .doTest ();
23432343 }
23442344
2345+ @ Ignore ("https://github.com/uber/NullAway/issues/1246" )
2346+ @ Test
2347+ public void nullableSuperConstructorArg () {
2348+ makeHelper ()
2349+ .addSourceLines (
2350+ "Test.java" ,
2351+ "import org.jspecify.annotations.NullMarked;" ,
2352+ "import org.jspecify.annotations.Nullable;" ,
2353+ "@NullMarked" ,
2354+ "public class Test {" ,
2355+ " private static class A<T extends @Nullable Object> {" ,
2356+ " A(T t) {}" ,
2357+ " }" ,
2358+ " private static class B extends A<@Nullable Object> {" ,
2359+ " B() {" ,
2360+ " super(null);" ,
2361+ " }" ,
2362+ " }" ,
2363+ "}" )
2364+ .doTest ();
2365+ }
2366+
2367+ @ Ignore ("https://github.com/uber/NullAway/issues/1246" )
2368+ @ Test
2369+ public void nullableSuperMethodArg () {
2370+ makeHelper ()
2371+ .addSourceLines (
2372+ "Test.java" ,
2373+ "import org.jspecify.annotations.NullMarked;" ,
2374+ "import org.jspecify.annotations.Nullable;" ,
2375+ "@NullMarked" ,
2376+ "public class Test {" ,
2377+ " private static class A<T extends @Nullable Object> {" ,
2378+ " void m(T t) {}" ,
2379+ " }" ,
2380+ " private static class B extends A<@Nullable Object> {" ,
2381+ " void test() {" ,
2382+ " m(null);" ,
2383+ " }" ,
2384+ " }" ,
2385+ "}" )
2386+ .doTest ();
2387+ }
2388+
23452389 @ Test
23462390 public void newNullableWithArg () {
23472391 makeHelper ()
You can’t perform that action at this time.
0 commit comments