Enum entries: add new tests with language feature ON & fix checker

This commit is contained in:
Mikhail Glukhikh
2023-01-24 08:48:54 +01:00
committed by Space Team
parent c534c54a1c
commit 41966a745e
24 changed files with 574 additions and 7 deletions
@@ -0,0 +1,29 @@
// !LANGUAGE: +EnumEntries
// WITH_STDLIB
package pckg
enum class A {
;
companion object
}
val A.Companion.entries: Int get() = 0
fun test() {
A.<!OPT_IN_USAGE_ERROR!>entries<!>
A.Companion.entries
with(A) {
this.entries
entries
}
with(A.Companion) {
entries
}
val aCompanion = A.Companion
aCompanion.entries
}