JVM IR: do not generate extension receiver parameter as ACC_MANDATED
Otherwise Java reflection is not able to load its type as a parameterized type. #KT-40857 Fixed
This commit is contained in:
committed by
Space Team
parent
d23a4f46cc
commit
47c48efa33
+17
@@ -0,0 +1,17 @@
|
||||
// SKIP_JDK6
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JVM
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
// PARAMETERS_METADATA
|
||||
|
||||
import java.lang.reflect.ParameterizedType
|
||||
|
||||
fun List<String>.bar(i: Int) = Unit
|
||||
|
||||
fun box(): String {
|
||||
val function = object {}.javaClass.enclosingClass.getDeclaredMethods().single { it.name == "bar" }
|
||||
val type = function.parameters[0].parameterizedType
|
||||
if (type !is ParameterizedType || type.toString() != "java.util.List<java.lang.String>") return "Fail: $type ${type.javaClass}"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user