Files
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

11 lines
221 B
Kotlin
Vendored

// LANGUAGE: +ContextSensitiveEnumResolutionInWhen
enum class Some {
FIRST,
SECOND;
}
fun foo(s: Some) = when (s) {
FIRST -> <!UNRESOLVED_REFERENCE!>SECOND<!>
SECOND -> <!UNRESOLVED_REFERENCE!>FIRST<!>
}