Java to Kotlin converter: more smartness about nullability
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
trait I {
|
||||
public fun getString(): String?
|
||||
}
|
||||
|
||||
class C() {
|
||||
fun foo(i: I) {
|
||||
val result = i.getString()
|
||||
if (result != null) {
|
||||
print(result)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user