JVM_IR: cast argument of enumValueOf to String in bytecode

Generic functions and implicit casts may return a supertype instead.

 #KT-45865 Fixed
This commit is contained in:
pyos
2021-04-12 17:51:46 +02:00
committed by Alexander Udalov
parent afaf3b5e28
commit cc7187e49b
10 changed files with 52 additions and 2 deletions
+6
View File
@@ -0,0 +1,6 @@
// IGNORE_BACKEND: WASM
enum class E { OK }
fun <T> id(x: T) = x
fun box() = enumValueOf<E>(id("OK")).name