Java to Kotlin converter: better treatment of nullable expressions

This commit is contained in:
Valentin Kipyatkov
2014-06-09 15:37:12 +04:00
parent 14efefedd6
commit 1491e0e5a7
10 changed files with 104 additions and 13 deletions
@@ -0,0 +1,12 @@
class C() {
fun getString(b: Boolean): String? {
return if (b)
"a"
else
null
}
fun foo(): Int {
return getString(true)?.length()!!
}
}