Java to Kotlin converter: correct nullability in signatures of overrides
#KT-5269 Fixed
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
//file
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
class Base {
|
||||
@Nullable
|
||||
public String foo(@Nullable String s) { return ""; }
|
||||
|
||||
public String bar(String s) {
|
||||
return s != null ? s + 1 : null;
|
||||
}
|
||||
|
||||
public String zoo(Object o){ return ""; }
|
||||
}
|
||||
|
||||
interface I {
|
||||
@Nullable String zoo(@Nullable Object o);
|
||||
}
|
||||
|
||||
class C extends Base implements I {
|
||||
public String foo(String s) { return ""; }
|
||||
|
||||
public String bar(String s) { return ""; }
|
||||
|
||||
public String zoo(Object o) { return ""; }
|
||||
}
|
||||
Reference in New Issue
Block a user