[IR] dumpKotlinLike: add testdata for FIR tests
This commit is contained in:
committed by
teamcityserver
parent
d7bd4240e1
commit
c68040753d
+24
@@ -0,0 +1,24 @@
|
||||
interface I1 {
|
||||
|
||||
}
|
||||
|
||||
interface I2 {
|
||||
|
||||
}
|
||||
|
||||
operator fun I1.component1(): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
operator fun I2.component2(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
fun test(x: I1) {
|
||||
when {
|
||||
x !is I2 -> return Unit
|
||||
}
|
||||
val <destruct>: I2 = x /*as I2 */
|
||||
val c1: Int = <destruct>.component1()
|
||||
val c2: String = <destruct>.component2()
|
||||
}
|
||||
Reference in New Issue
Block a user