a4c7619c89
Without this commit, JVM name mapping logic in BE does not work for FIR, because FIR cannot use old BuiltInsPackageFragmentImpl descriptor. In this commit we add our own implementation thus fixing a pack of FIR black box tests.
27 lines
504 B
Kotlin
Vendored
27 lines
504 B
Kotlin
Vendored
// CHECK_CASES_COUNT: function=doTheThing count=2
|
|
// CHECK_IF_COUNT: function=doTheThing count=2
|
|
|
|
private fun Any?.doTheThing(): String {
|
|
when (this) {
|
|
is String -> return this
|
|
is Level -> {
|
|
when (this) {
|
|
Level.O -> return Level.O.name
|
|
Level.K -> return Level.K.name
|
|
}
|
|
}
|
|
|
|
else -> return "fail"
|
|
}
|
|
}
|
|
|
|
|
|
enum class Level {
|
|
O,
|
|
K
|
|
}
|
|
|
|
|
|
fun box(): String {
|
|
return "O".doTheThing() + Level.K.doTheThing()
|
|
} |