Files
kotlin-fork/compiler/testData/diagnostics/tests/enum/entries/entriesPropertyImport.fir.kt
T
Roman Efremov 02b5fed389 Fix inaccurate report of DEPRECATED_ACCESS_TO_ENTRY_PROPERTY_FROM_ENUM
It can be reported not only from within the enum, but also from
top-level functions. Add separate diagnostic for such cases.

^KT-64488
2024-02-27 11:22:35 +00:00

12 lines
206 B
Kotlin
Vendored

// !LANGUAGE: -EnumEntries -PrioritizedEnumEntries
// WITH_STDLIB
import MyEnum.entries
enum class MyEnum
val entries = "local str"
fun test() {
<!DEPRECATED_ACCESS_TO_ENTRIES_PROPERTY!>entries<!>
}