aef6787e87
Addition to other safe call tests that are already present in tests. ^KT-41034
16 lines
233 B
Kotlin
Vendored
16 lines
233 B
Kotlin
Vendored
// WITH_STDLIB
|
||
|
||
class C {
|
||
var x: Int = 0
|
||
}
|
||
|
||
fun test(с: C?, a: Any) {
|
||
с?.x = if (a is String) 0 else throw Exception();
|
||
a.<!UNRESOLVED_REFERENCE!>toUpperCase<!>()
|
||
}
|
||
|
||
|
||
fun main(args: Array<String>) {
|
||
test(null, 1)
|
||
}
|