Files
kotlin-fork/compiler/testData/diagnostics/tests/when/whenOverEnumWithSameNameAsEntry.kt
T
Kirill Rakhman cf2ef443f4 [FIR] Introduce a feature flag for context-sensitive enum resolution
The feature was previously enabled unconditionally in K2 which
triggered a bug when an enum has an entry with the same name as itself.

#KT-58897 Fixed
#KT-52774
2023-05-30 11:59:56 +00:00

13 lines
123 B
Kotlin
Vendored

// FIR_IDENTICAL
// KT-58897
enum class A {
A,
B,
}
fun test2(a: A) = when (a) {
A.A -> "A"
A.B -> "B"
}