Files
kotlin-fork/compiler/testData/diagnostics/tests/enum/entries/toBeShadowed.kt
T
Mikhail Glukhikh 3ff2c7d6f7 K2: introduce custom Enum.entries migration checkers
Related to KT-56623, KT-56587
#KT-59344 Fixed
2023-08-31 13:29:02 +00:00

47 lines
620 B
Kotlin
Vendored

// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
// WITH_STDLIB
// ISSUE: KT-56587
enum class E05 {
;
object entries
}
fun test05() {
println(E05.entries)
}
enum class E07(val entries: String) {
;
fun test() {
println(entries)
}
}
enum class E071 {
;
constructor(entries: String) {
println(entries)
}
}
enum class E09 {
;
val entries: String = "entries"
fun test() {
println(entries)
}
}
interface I01 {
val entries: String
get() = "entries"
}
enum class E10 : I01 {
;
fun test() {
println(entries)
}
}