mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 00:21:32 +00:00
There are cases when members deserialized from JVM classes have no JVM signature in the proto. For example, if a member is inherited from a built-in class (such as Map.getOrDefault in some Map implementations), or if a member is synthesized in the compiler front-end and back-end separately (such as enum values/valueOf). In these cases, we'll use the naive type mapping to try to recover the signature. #KT-16616 Fixed #KT-17542 Fixed
16 lines
408 B
Kotlin
Vendored
16 lines
408 B
Kotlin
Vendored
// IGNORE_BACKEND: JS_IR, JS, NATIVE
|
|
// WITH_REFLECT
|
|
|
|
import kotlin.test.assertEquals
|
|
|
|
enum class E { X, Y, Z }
|
|
|
|
fun box(): String {
|
|
assertEquals("fun values(): kotlin.Array<E>", E::values.toString())
|
|
assertEquals(listOf(E.X, E.Y, E.Z), E::values.call().toList())
|
|
assertEquals("fun valueOf(kotlin.String): E", E::valueOf.toString())
|
|
assertEquals(E.Y, E::valueOf.call("Y"))
|
|
|
|
return "OK"
|
|
}
|