Java to Kotlin converter: correct nullability in signatures of overrides

#KT-5269 Fixed
This commit is contained in:
Valentin Kipyatkov
2014-06-20 19:26:39 +04:00
parent 2188af2bf9
commit 5ac762034a
16 changed files with 153 additions and 25 deletions
@@ -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 ""; }
}