mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Now we have type annotations nullability inference. It is used by `asPsiType` (K1 and K2) and from SLC. ^KT-61892 GitOrigin-RevId: 289916faa5e3b78bdcbfdc780f9c92214869c8a8
26 lines
543 B
Java
26 lines
543 B
Java
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
class X extends A {
|
|
@Override
|
|
String foo(int n, @NotNull String s, @Nullable Object o) {
|
|
return "";
|
|
}
|
|
}
|
|
|
|
class Y extends X {
|
|
@Override
|
|
String foo(int n, @NotNull String s, @Nullable Object o) {
|
|
return super.foo(n, s, o);
|
|
}
|
|
}
|
|
|
|
class Test {
|
|
void test() {
|
|
new A().foo(1, "abc", "def");
|
|
new B().foo(2, "abc", "def");
|
|
new X().foo(3, "abc", "def");
|
|
new Y().foo(4, "abc", "def");
|
|
}
|
|
}
|