Java to Kotlin converter: more smartness about nullability
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
//file
|
||||
interface I {
|
||||
String getString();
|
||||
}
|
||||
|
||||
class C {
|
||||
void foo(I i) {
|
||||
final String result = i.getString();
|
||||
if (result != null) {
|
||||
print(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user