Update synthetic parameter processing logic according to ASM 7 changes

#KT-27774 Fixed
This commit is contained in:
Mikhael Bogdanov
2018-10-29 08:48:37 +01:00
parent 23b9889ebb
commit d2a205c72d
47 changed files with 808 additions and 12 deletions
@@ -0,0 +1,29 @@
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
// WITH_REFLECT
import kotlin.reflect.full.valueParameters
@Retention(AnnotationRetention.RUNTIME)
annotation class Simple(val value: String)
fun local(): Any {
class A(@Simple("OK") val z: String)
return A("OK")
}
fun localCaptured(): Any {
val z = 1
class A(@Simple("K") val z: String) {
val x = z
}
return A("K")
}
fun box(): String {
return (local()::class.constructors.single().valueParameters.single().annotations.single() as Simple).value
//KT-25573
//return (localCaptured()::class.constructors.single().valueParameters.single().annotations.single() as Simple).value
}