Java to Kotlin converter: more smartness about nullability

This commit is contained in:
Valentin Kipyatkov
2014-06-06 21:26:25 +04:00
parent e947ad7294
commit 0695f6b3d7
18 changed files with 143 additions and 10 deletions
@@ -0,0 +1,14 @@
//file
interface I {
String getString();
}
class C {
void foo(I i, boolean b) {
String result = i.getString();
if (b) result = null;
if (result != null) {
print(result);
}
}
}