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
@@ -6,7 +6,7 @@ public class Test(str: String) {
var myStr: String = "String2"
public fun sout(str: String) {
System.out?.println(str)
System.out!!.println(str)
}
public fun dummy(str: String): String {
@@ -15,8 +15,8 @@ class Bar() {
class Test() {
public fun test(barNotNull: Bar, barNullable: Bar?) {
barNotNull.fooNotNull.execute()
barNotNull.fooNullable?.execute()
barNullable?.fooNotNull?.execute()
barNullable?.fooNullable?.execute()
barNotNull.fooNullable!!.execute()
barNullable!!.fooNotNull.execute()
barNullable!!.fooNullable!!.execute()
}
}