J2K: Use parameters nullability for method call

This commit is contained in:
Natalia Ukhorskaya
2016-03-02 14:46:07 +03:00
parent c1df0e4aeb
commit b50f2dc6e5
10 changed files with 131 additions and 24 deletions
+42
View File
@@ -0,0 +1,42 @@
package test
import java.util.ArrayList
class Test {
private var myProp: String? = null
private var myIntProp: Int? = null
fun onCreate() {
myProp = ""
myIntProp = 1
}
fun test() {
foo1(myProp!!)
foo2(myProp!!)
foo3(myProp)
myProp!![myIntProp!!]
println(myProp)
val b = "aaa" == myProp
val s = "aaa" + myProp!!
myProp!!.compareTo(myProp!!, ignoreCase = true)
val list = ArrayList<Int>()
list.remove(myIntProp!!)
}
fun foo1(s: String) {
}
fun foo2(s: String) {
}
fun foo3(s: String?) {
}
}