Files
kotlin/compiler/testData/codegen/light-analysis/reflection/kClassInAnnotation/wrappingForCallableReferences.txt
Denis Zharkov 6fb83c2ba3 Force wrapping java classes from annotation methods into KClasses
Before this change such wrapping happened only during coercion,
i.e. when a call-site expected a KClass instance.

But when call-site expects Any, for example, no wrapping happened,
and raw j.l.Class instance was left on stack.

The solution is to put wrapping code closer to generation of annotation's
method call itself to guarantee that necessary wrapping will happen.

 #KT-9453 Fixed
2017-03-02 15:19:09 +03:00

18 lines
1.3 KiB
Plaintext
Vendored

@java.lang.annotation.Retention
@kotlin.Metadata
public annotation class Anno {
public abstract method kClasses(): java.lang.Class[]
public abstract method kClassesVararg(): java.lang.Class[]
public abstract method klass(): java.lang.Class
}
@kotlin.Metadata
public final class WrappingForCallableReferencesKt {
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
public final static method checkBoundReference(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.jvm.functions.Function0): void
public final static method checkBoundReferenceArray(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.jvm.functions.Function0): void
public final static method checkReference(@org.jetbrains.annotations.NotNull p0: Anno, @org.jetbrains.annotations.Nullable p1: java.lang.Object, @org.jetbrains.annotations.NotNull p2: kotlin.jvm.functions.Function1): void
public final static method checkReferenceArray(@org.jetbrains.annotations.NotNull p0: Anno, @org.jetbrains.annotations.Nullable p1: java.lang.Object, @org.jetbrains.annotations.NotNull p2: kotlin.jvm.functions.Function1): void
public final static @Anno method foo(): void
}