K2: introduce custom Enum.entries migration checkers
Related to KT-56623, KT-56587 #KT-59344 Fixed
This commit is contained in:
committed by
Space Team
parent
e0d68fc93e
commit
3ff2c7d6f7
@@ -0,0 +1,46 @@
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// ISSUE: KT-56587
|
||||
|
||||
enum class E05 {
|
||||
;
|
||||
object entries
|
||||
}
|
||||
|
||||
fun test05() {
|
||||
println(<!DEPRECATED_ACCESS_TO_ENTRY_PROPERTY_FROM_ENUM!>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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user