K2: reproduce strange "smartcast aside" behavior related to KT-62544 fix

This commit is contained in:
Mikhail Glukhikh
2023-10-27 14:42:08 +02:00
committed by Space Team
parent 9c146adc3a
commit 1ef0f9e944
16 changed files with 337 additions and 0 deletions
@@ -0,0 +1,24 @@
interface A {
abstract fun foo()
}
interface B : A {
abstract fun bar()
}
interface C : A {
abstract fun baz()
}
fun test(param: B) {
when {
param is C -> { // BLOCK
param.foo()
param.bar()
param /*as C */.baz()
}
}
}