K2: Fix deserialization of flexible type based on type parameter
It's anyway safe to use avoidComprehensiveCheck = true because during deserialization we're sure that we need DNN type because it's been serialized as such.
This commit is contained in:
committed by
Space Team
parent
ff340505ec
commit
f7d8fd54ca
+24
@@ -0,0 +1,24 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_STDLIB
|
||||
// MODULE: lib
|
||||
|
||||
// FILE: JavaInterface.java
|
||||
public interface JavaInterface {
|
||||
<K extends Comparable<K>> K foo();
|
||||
}
|
||||
|
||||
// FILE: A.kt
|
||||
|
||||
class A(j: JavaInterface) : JavaInterface by j
|
||||
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: main.kt
|
||||
|
||||
fun box(): String {
|
||||
val t = object : JavaInterface {
|
||||
override fun <K : Comparable<K>> foo(): K = "OK" as K
|
||||
}
|
||||
|
||||
return A(t).foo<String>()
|
||||
}
|
||||
Reference in New Issue
Block a user