Reflection: add KClass.typeParameters, KCallable.typeParameters

Inheritance from KCallable is removed in kt9078.kt because it was irrelevant to
the test and because it gets in the way of modification of KCallable
This commit is contained in:
Alexander Udalov
2016-07-12 16:50:12 +03:00
parent f69cc01f8e
commit 127e7ab5b7
11 changed files with 89 additions and 21 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
// KT-9078 (NPE in control flow analysis); EA-71535
abstract class KFunctionKt9005WorkAround<out R: Any?>(private val _functionInstance: Function<R>): kotlin.reflect.KCallable<R> {
abstract class KFunctionKt9005WorkAround<out R: Any?>(private val _functionInstance: Function<R>) {
private val _reflectedFunction: kotlin.reflect.KFunction<R> = _functionInstance.<!UNRESOLVED_REFERENCE!>reflect<!>() ?: throw IllegalStateException("")
private val _parameters: List<kotlin.reflect.KParameter> = run {
@@ -9,4 +9,4 @@ abstract class KFunctionKt9005WorkAround<out R: Any?>(private val _functionInsta
}
}
}
}
}