[FIR] Fix false negative NO_REFLECTION_IN_CLASS_PATH
... in presence of typealiases. #KT-61921
This commit is contained in:
committed by
Space Team
parent
5d7e6f2aab
commit
f5f77d43bf
+28
@@ -49,6 +49,34 @@ fun <T : Any> kclass(k: KClass<*>, kt: KClass<T>) {
|
||||
k.toString()
|
||||
}
|
||||
|
||||
typealias TA<T> = KClass<T>
|
||||
|
||||
fun <T : Any> kclassTa(k: TA<*>, kt: TA<T>) {
|
||||
k.simpleName
|
||||
k.qualifiedName
|
||||
k.<!NO_REFLECTION_IN_CLASS_PATH!>members<!>
|
||||
k.<!NO_REFLECTION_IN_CLASS_PATH!>constructors<!>
|
||||
k.<!NO_REFLECTION_IN_CLASS_PATH!>nestedClasses<!>
|
||||
k.<!NO_REFLECTION_IN_CLASS_PATH!>objectInstance<!>
|
||||
k.<!NO_REFLECTION_IN_CLASS_PATH!>typeParameters<!>
|
||||
k.<!NO_REFLECTION_IN_CLASS_PATH!>supertypes<!>
|
||||
k.<!NO_REFLECTION_IN_CLASS_PATH!>visibility<!>
|
||||
k.<!NO_REFLECTION_IN_CLASS_PATH!>isFinal<!>
|
||||
k.<!NO_REFLECTION_IN_CLASS_PATH!>isOpen<!>
|
||||
k.<!NO_REFLECTION_IN_CLASS_PATH!>isAbstract<!>
|
||||
k.<!NO_REFLECTION_IN_CLASS_PATH!>isSealed<!>
|
||||
k.<!NO_REFLECTION_IN_CLASS_PATH!>isData<!>
|
||||
k.<!NO_REFLECTION_IN_CLASS_PATH!>isInner<!>
|
||||
k.<!NO_REFLECTION_IN_CLASS_PATH!>isCompanion<!>
|
||||
|
||||
k.<!NO_REFLECTION_IN_CLASS_PATH!>annotations<!>
|
||||
k.isInstance(42)
|
||||
|
||||
k == kt
|
||||
k.hashCode()
|
||||
k.toString()
|
||||
}
|
||||
|
||||
fun ktype(t: KType, t2: KType) {
|
||||
t.classifier
|
||||
t.arguments
|
||||
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T : kotlin.Any> kclass(/*0*/ k: kotlin.reflect.KClass<*>, /*1*/ kt: kotlin.reflect.KClass<T>): kotlin.Unit
|
||||
public fun ktype(/*0*/ t: kotlin.reflect.KType, /*1*/ t2: kotlin.reflect.KType): kotlin.Unit
|
||||
public fun n01(): kotlin.reflect.KProperty1<Foo, kotlin.Any>
|
||||
public fun n02(): kotlin.reflect.KFunction1<Foo, kotlin.Unit>
|
||||
public fun n03(): kotlin.reflect.KClass<Foo>
|
||||
public fun n04(/*0*/ p: kotlin.reflect.KProperty0<kotlin.Int>): kotlin.Int
|
||||
public fun n05(/*0*/ p: kotlin.reflect.KMutableProperty0<kotlin.String>): kotlin.Unit
|
||||
public fun n07(/*0*/ p: kotlin.reflect.KFunction<kotlin.String>): kotlin.String
|
||||
public fun n08(/*0*/ p: kotlin.reflect.KProperty1<kotlin.String, kotlin.Int>): kotlin.Int
|
||||
public fun n09(/*0*/ p: kotlin.reflect.KProperty2<kotlin.String, kotlin.String, kotlin.Int>): kotlin.Int
|
||||
public fun n10(): kotlin.Unit
|
||||
public fun n11(): kotlin.Unit
|
||||
public fun y01(): kotlin.reflect.KProperty1.Getter<Foo, kotlin.Any>
|
||||
public fun y02(): kotlin.collections.Collection<kotlin.reflect.KCallable<*>>
|
||||
public fun y03(): kotlin.String?
|
||||
public fun y04(): [Error type: Return type for function cannot be resolved]
|
||||
public fun y05(): kotlin.Any
|
||||
|
||||
public final class Foo {
|
||||
public constructor Foo(/*0*/ prop: kotlin.Any)
|
||||
public final val prop: kotlin.Any
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun func(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user