Basic class members generation.
Split testData into 'classes' and 'expressions'.
This commit is contained in:
committed by
Dmitry Petrov
parent
703d3405ed
commit
0b647ac358
@@ -0,0 +1,17 @@
|
||||
val p: Any? = null
|
||||
|
||||
fun foo(): Any? = null
|
||||
|
||||
fun test1(a: Any?, b: Any) = a ?: b
|
||||
|
||||
fun test2(a: String?, b: Any) = a ?: b
|
||||
|
||||
fun test3(a: Any?, b: Any?): String {
|
||||
if (b !is String) return ""
|
||||
if (a !is String?) return ""
|
||||
return a ?: b
|
||||
}
|
||||
|
||||
fun test4(x: Any) = p ?: x
|
||||
|
||||
fun test5(x: Any) = foo() ?: x
|
||||
Reference in New Issue
Block a user