Enum entries: add new tests with language feature ON & fix checker
This commit is contained in:
committed by
Space Team
parent
c534c54a1c
commit
41966a745e
+28
@@ -0,0 +1,28 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// WITH_STDLIB
|
||||
|
||||
enum class A {
|
||||
;
|
||||
|
||||
companion object {
|
||||
val entries = 0
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A.<!OPT_IN_USAGE_ERROR!>entries<!>
|
||||
A.Companion.entries
|
||||
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>with<!>(A) {
|
||||
entries
|
||||
this.entries
|
||||
<!UNRESOLVED_REFERENCE!>values<!>() // to be sure that we don't resolve into synthetic 'values'
|
||||
}
|
||||
|
||||
with(A.Companion) {
|
||||
entries
|
||||
}
|
||||
|
||||
val aCompanion = A.Companion
|
||||
aCompanion.entries
|
||||
}
|
||||
Reference in New Issue
Block a user