K1/K2: add Enum.entries unconditionally and filter them out in tower
Before this commit, we added Enum.entries only in case when LanguageFeature.EnumEntries was ON (with an exception in K1/Java case). In this commit we add Enum.entries unconditionally, and in case the language feature is OFF we filter them out during tower resolve.
This commit is contained in:
@@ -8,7 +8,7 @@ import kotlin.test.assertTrue
|
||||
enum class E { X, Y, Z }
|
||||
|
||||
fun box(): String {
|
||||
assertTrue(E::class.members.size in 11..12, "" + E::class.members.size)
|
||||
assertTrue(E::class.members.size in 12..13, "" + E::class.members.size)
|
||||
assertEquals("Y", E::name.call(E.Y))
|
||||
assertEquals(2, E::ordinal.call(E.Z))
|
||||
return "OK"
|
||||
|
||||
Reference in New Issue
Block a user