cf2ef443f4
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
11 lines
221 B
Kotlin
Vendored
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<!>
|
|
}
|