JVM IR: Copy type parameters from class to suspendImpl
These type parameters where used in function parameters, but since suspendImpl is static function, it has no access to class type parameters. Solution is to copy them to the function itself. #KT-55125 Fixed
This commit is contained in:
committed by
Space Team
parent
94f1c579df
commit
901ff06e90
@@ -0,0 +1,20 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
|
||||
abstract class AbstractPersistence<T, U> {
|
||||
open suspend fun fetch(identifier: U): T? = null
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val genericString =
|
||||
AbstractPersistence::class.java.declaredMethods
|
||||
.single { it.name.contains("\$suspendImpl") }
|
||||
.toGenericString()
|
||||
|
||||
if (!genericString.startsWith("static <T,U>")) {
|
||||
return genericString
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user