Java to Kotlin converter: generate "!!." instead of "?." for nullable values

#KT-3943 Fixed
This commit is contained in:
Valentin Kipyatkov
2014-06-10 18:30:58 +04:00
parent a07dae9734
commit b71061eb5c
12 changed files with 24 additions and 28 deletions
@@ -4,6 +4,6 @@ class C() {
}
fun foo(): Int {
return getString(true)?.length()!!
return getString(true)!!.length()
}
}
}
@@ -1,5 +1,5 @@
fun foo(s: String?, b: Boolean): Int {
if (s == null) System.out.println("null")
if (b) return s?.length()!!
if (b) return s!!.length()
return 10
}