Change Signature: Propagate nullability annotations to overriding methods in Java
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
class X extends A {
|
||||
@Override
|
||||
String foo(int n) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
class Y extends X {
|
||||
@Override
|
||||
String foo(int n) {
|
||||
return super.foo(n);
|
||||
}
|
||||
}
|
||||
|
||||
class Test {
|
||||
void test() {
|
||||
new A().foo(1);
|
||||
new B().foo(2);
|
||||
new X().foo(3);
|
||||
new Y().foo(4);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user