From c575ad9fb00b4142ca986b1988720f42300b74bd Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Tue, 1 Jul 2014 21:01:07 +0400 Subject: [PATCH] Fix test, remove duplicate annotation It started to fail only now because KClassImpl constructor is now loading class' annotations (previously annotations weren't loaded by Java reflection) --- .../KotlinPropertyAsAnnotationParameter.B.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.B.kt b/compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.B.kt index efa50fe6ebf..32e6000ec7a 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.B.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.B.kt @@ -3,8 +3,10 @@ import java.lang.annotation.RetentionPolicy import a.* Ann(i, s, f, d, l, b, bool, c, str) +class MyClass1 + Ann(i2, s2, f2, d2, l2, b2, bool2, c2, str2) -class MyClass +class MyClass2 Retention(RetentionPolicy.RUNTIME) annotation class Ann( @@ -20,7 +22,7 @@ annotation class Ann( ) fun main(args: Array) { - MyClass() + // Trigger annotation loading + (MyClass1() as java.lang.Object).getClass().getAnnotations() + (MyClass2() as java.lang.Object).getClass().getAnnotations() } - -