Java to Kotlin converter: generate "!!." instead of "?." for nullable values
#KT-3943 Fixed
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user