Tests: update some backend tests on enum entries
The enumEntriesIntrinsicMultipleEnums.kt test was supposed to check that JVM backend generates 3 `$EntriesIntrinsicMappings` classes: for X, for Y, and for Z. Mappings classes are generated for enums without `entries`, i.e. Kotlin enums compiled without `EnumEntries` language feature, and Java enums. The test incorrectly _enabled_ the language feature for X though, and `$EntriesIntrinsicMappings` for X was generated anyway because of KT-61208. To keep the original intention of the test, I'm disabling the language feature for X, so that it will be considered as enum without `entries`. KT-61208 will be fixed in a separate commit (with separate tests). The boxInline and bytecodeText tests changed their meaning when language feature EnumEntries started to be enabled by default, so those changes are a continuation toebd43fc8c0. The behavior did not change after enabling the feature, once again because of KT-61208. Also, remove obsolete error suppressions which are no longer needed after64c8ce18a0.
This commit is contained in:
committed by
Space Team
parent
cb65d2420f
commit
db31f1f926
@@ -3,11 +3,8 @@
|
||||
// IGNORE_BACKEND: JS, JVM
|
||||
// WITH_STDLIB
|
||||
|
||||
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
|
||||
import kotlin.enums.*
|
||||
|
||||
|
||||
enum class EnumWithClash {
|
||||
values,
|
||||
entries,
|
||||
@@ -21,4 +18,4 @@ fun box(): String {
|
||||
if (EnumWithClash.entries.toString() != "entries") return "FAIL 2"
|
||||
if (enumEntries<EnumWithClash>().toString() != "[values, entries, valueOf]") return "FAIL 3"
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user