Files
kotlin-fork/idea/testData/checker/infos/SmartCastToEnum.kt
T

17 lines
319 B
Kotlin
Vendored
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// FIR_COMPARISON
package test2
<info descr="null">enum</info> class En { A, B, С }
fun main(args: Array<String>) {
val en2: Any? = En.A
if (en2 is En) {
when (<info descr="Smart cast to test2.En">en2</info>) {
En.A -> {}
En.B -> {}
En.С -> {}
}
}
}