diff --git a/compiler/testData/asJava/annotations/NestedClass.kt b/compiler/testData/asJava/annotations/NestedClass.kt index e3013fa2b62..dba5953d2e6 100644 --- a/compiler/testData/asJava/annotations/NestedClass.kt +++ b/compiler/testData/asJava/annotations/NestedClass.kt @@ -1,5 +1,5 @@ annotation class Ann class Outer { - Ann class Nested + @Ann class Nested } \ No newline at end of file diff --git a/compiler/testData/asJava/lightClassStructure/Declared.kt b/compiler/testData/asJava/lightClassStructure/Declared.kt index 6de41e2e23d..c5edb182ff8 100644 --- a/compiler/testData/asJava/lightClassStructure/Declared.kt +++ b/compiler/testData/asJava/lightClassStructure/Declared.kt @@ -26,9 +26,9 @@ enum class Enum interface Trait // Deprecation -Deprecated("") class DeprecatedClass -kotlin.Deprecated("") class DeprecatedFQN -kotlin. Deprecated /**/ ("") class DeprecatedFQNSpaces +@Deprecated("") class DeprecatedClass +@kotlin.Deprecated("") class DeprecatedFQN +@kotlin. Deprecated /**/ ("") class DeprecatedFQNSpaces @[Deprecated("")] class DeprecatedWithBrackets @[kotlin.Deprecated("")] class DeprecatedWithBracketsFQN @[kotlin diff --git a/compiler/testData/asJava/lightClassStructure/PlatformStaticMethodsGenerics.kt b/compiler/testData/asJava/lightClassStructure/PlatformStaticMethodsGenerics.kt index e10300b9ff4..a732e86255a 100644 --- a/compiler/testData/asJava/lightClassStructure/PlatformStaticMethodsGenerics.kt +++ b/compiler/testData/asJava/lightClassStructure/PlatformStaticMethodsGenerics.kt @@ -4,7 +4,7 @@ import kotlin.platform.platformStatic class PlatformStaticClass { companion object { - platformStatic + @platformStatic fun inClassObject() {} } diff --git a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Class.kt b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Class.kt index 25d8c9099bf..5f1a13db144 100644 --- a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Class.kt +++ b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Class.kt @@ -7,11 +7,11 @@ class Class { fun notNull(a: String): String = "" fun nullable(a: String?): String? = "" - NotNull fun notNullWithNN(): String = "" - Nullable fun notNullWithN(): String = "" + @NotNull fun notNullWithNN(): String = "" + @Nullable fun notNullWithN(): String = "" - Nullable fun nullableWithN(): String? = "" - NotNull fun nullableWithNN(): String? = "" + @Nullable fun nullableWithN(): String? = "" + @NotNull fun nullableWithNN(): String? = "" val nullableVal: String? = "" var nullableVar: String? = "" diff --git a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Trait.kt b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Trait.kt index 11d7f619b95..01065592821 100644 --- a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Trait.kt +++ b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Trait.kt @@ -7,11 +7,11 @@ interface Trait { fun notNull(a: String): String fun nullable(a: String?): String? - NotNull fun notNullWithNN(): String - Nullable fun notNullWithN(): String + @NotNull fun notNullWithNN(): String + @Nullable fun notNullWithN(): String - Nullable fun nullableWithN(): String? - NotNull fun nullableWithNN(): String? + @Nullable fun nullableWithN(): String? + @NotNull fun nullableWithNN(): String? val nullableVal: String? var nullableVar: String? diff --git a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/_DefaultPackage.kt b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/_DefaultPackage.kt index 238976fc9a6..7df1bd0ce7e 100644 --- a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/_DefaultPackage.kt +++ b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/_DefaultPackage.kt @@ -6,11 +6,11 @@ import org.jetbrains.annotations.Nullable fun notNull(a: String): String = "" fun nullable(a: String?): String? = "" -NotNull fun notNullWithNN(): String = "" -Nullable fun notNullWithN(): String = "" +@NotNull fun notNullWithNN(): String = "" +@Nullable fun notNullWithN(): String = "" -Nullable fun nullableWithN(): String? = "" -NotNull fun nullableWithNN(): String? = "" +@Nullable fun nullableWithN(): String? = "" +@NotNull fun nullableWithNN(): String? = "" val nullableVal: String? = "" var nullableVar: String? = "" diff --git a/compiler/testData/codegen/box/defaultArguments/constructor/annotation.kt b/compiler/testData/codegen/box/defaultArguments/constructor/annotation.kt index eb60c08c993..f7e1453599d 100644 --- a/compiler/testData/codegen/box/defaultArguments/constructor/annotation.kt +++ b/compiler/testData/codegen/box/defaultArguments/constructor/annotation.kt @@ -1,7 +1,7 @@ annotation class A(val a: Int = 0) -A fun test1() = 1 -A(2) fun test2() = 1 +@A fun test1() = 1 +@A(2) fun test2() = 1 fun box(): String { if ((test1() + test2()) == 2) { diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt b/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt index df9ef95431e..a2b5a807f99 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt @@ -1,7 +1,7 @@ -JavaAnn class MyClass1 -JavaAnn() class MyClass2 -JavaAnn("asd") class MyClass3 -JavaAnn(*array()) class MyClass4 +@JavaAnn class MyClass1 +@JavaAnn() class MyClass2 +@JavaAnn("asd") class MyClass3 +@JavaAnn(*array()) class MyClass4 fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueNoDefault.kt b/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueNoDefault.kt index 3f094adc301..2171ee2eeb1 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueNoDefault.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueNoDefault.kt @@ -1,7 +1,7 @@ -JavaAnn class MyClass1 -JavaAnn() class MyClass2 -JavaAnn("asd") class MyClass3 -JavaAnn(*array()) class MyClass4 +@JavaAnn class MyClass1 +@JavaAnn() class MyClass2 +@JavaAnn("asd") class MyClass3 +@JavaAnn(*array()) class MyClass4 fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationCall.kt b/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationCall.kt index 9c985771453..63472a38667 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationCall.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationCall.kt @@ -1,4 +1,4 @@ -JavaAnn("value") class MyClass +@JavaAnn("value") class MyClass fun box(): String { val ann = javaClass().getAnnotation(javaClass()) diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationDefault.kt b/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationDefault.kt index a5f4b5e9228..7c026047af8 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationDefault.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationDefault.kt @@ -1,5 +1,5 @@ -JavaAnn class MyClass -JavaAnn2 class MyClass2 +@JavaAnn class MyClass +@JavaAnn2 class MyClass2 fun box(): String { val ann = javaClass().getAnnotation(javaClass()) diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt index 70dc0a231d4..3ae2f27f707 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt @@ -1,4 +1,4 @@ -Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b) class MyClass +@Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b) class MyClass fun box(): String { val ann = javaClass().getAnnotation(javaClass()) diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt index 7748dea6bc7..37c86b356df 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt @@ -1,4 +1,4 @@ -Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b, Foo.bool, Foo.c, Foo.str, Foo.charAsInt, Foo.intAsChar) class MyClass +@Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b, Foo.bool, Foo.c, Foo.str, Foo.charAsInt, Foo.intAsChar) class MyClass fun box(): String { val ann = javaClass().getAnnotation(javaClass()) diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt b/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt index d862b7582f0..0b114ae6103 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt @@ -1,4 +1,4 @@ -Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b, Foo.c) class MyClass +@Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b, Foo.c) class MyClass fun box(): String { val ann = javaClass().getAnnotation(javaClass()) diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt index bbf3c571821..8931185631c 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt @@ -1,7 +1,7 @@ class O class K -JavaAnn(args = array(O::class, K::class)) class MyClass +@JavaAnn(args = array(O::class, K::class)) class MyClass fun box(): String { val args = javaClass().getAnnotation(javaClass()).args() diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt index 1a1ba627b1f..2cd6bb8ec93 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt @@ -1,7 +1,7 @@ class OK -JavaAnn(OK::class) class MyClass +@JavaAnn(OK::class) class MyClass fun box(): String { val ann = javaClass().getAnnotation(javaClass()) diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt index 8e936562c94..61e852628dc 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt @@ -1,7 +1,7 @@ class O class K -JavaAnn(O::class, K::class) class MyClass +@JavaAnn(O::class, K::class) class MyClass fun box(): String { val args = javaClass().getAnnotation(javaClass()).value diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationArrayValueDefault.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationArrayValueDefault.kt index 6517a950658..623ed356116 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationArrayValueDefault.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationArrayValueDefault.kt @@ -1,7 +1,7 @@ -JavaAnn class MyClass1 -JavaAnn() class MyClass2 -JavaAnn("asd") class MyClass3 -JavaAnn(*array()) class MyClass4 +@JavaAnn class MyClass1 +@JavaAnn() class MyClass2 +@JavaAnn("asd") class MyClass3 +@JavaAnn(*array()) class MyClass4 fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationArrayValueNoDefault.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationArrayValueNoDefault.kt index b0072ebff1a..bd14ac00527 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationArrayValueNoDefault.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationArrayValueNoDefault.kt @@ -1,7 +1,7 @@ -JavaAnn class MyClass1 -JavaAnn() class MyClass2 -JavaAnn("asd") class MyClass3 -JavaAnn(*array()) class MyClass4 +@JavaAnn class MyClass1 +@JavaAnn() class MyClass2 +@JavaAnn("asd") class MyClass3 +@JavaAnn(*array()) class MyClass4 fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationCall.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationCall.kt index 75a38d9a7b2..7370cc165c0 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationCall.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationCall.kt @@ -1,4 +1,4 @@ -JavaAnn("value") class MyClass +@JavaAnn("value") class MyClass fun box(): String { val ann = javaClass().getAnnotation(javaClass()) diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationDefault.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationDefault.kt index 9afd86e5b38..38cab48b3e4 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationDefault.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationDefault.kt @@ -1,5 +1,5 @@ -JavaAnn class MyClass -JavaAnn2 class MyClass2 +@JavaAnn class MyClass +@JavaAnn2 class MyClass2 fun box(): String { val ann = javaClass().getAnnotation(javaClass()) diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/arrayClassParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/arrayClassParameter.kt index bbf3c571821..8931185631c 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/arrayClassParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/arrayClassParameter.kt @@ -1,7 +1,7 @@ class O class K -JavaAnn(args = array(O::class, K::class)) class MyClass +@JavaAnn(args = array(O::class, K::class)) class MyClass fun box(): String { val args = javaClass().getAnnotation(javaClass()).args() diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/classParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/classParameter.kt index 4317bede4e3..17ba50b60b3 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/classParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/classParameter.kt @@ -1,7 +1,7 @@ class OK -JavaAnn(OK::class) class MyClass +@JavaAnn(OK::class) class MyClass fun box(): String { val ann = javaClass().getAnnotation(javaClass()) diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/varargClassParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/varargClassParameter.kt index deaf6880207..853a49d5745 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/varargClassParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/varargClassParameter.kt @@ -1,7 +1,7 @@ class O class K -JavaAnn(O::class, K::class) class MyClass +@JavaAnn(O::class, K::class) class MyClass fun box(): String { val args = javaClass().getAnnotation(javaClass()).value() diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/retentionInJava.kt b/compiler/testData/codegen/boxAgainstJava/annotations/retentionInJava.kt index afef366eeae..b2599185872 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/retentionInJava.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/retentionInJava.kt @@ -1,6 +1,6 @@ import java.lang.annotation.* -Foo class Bar +@Foo class Bar fun box(): String { Bar() diff --git a/compiler/testData/codegen/boxWithJava/platformStatic/annotations/simpleClassObject.kt b/compiler/testData/codegen/boxWithJava/platformStatic/annotations/simpleClassObject.kt index bd7485e98bd..0447b4190f1 100644 --- a/compiler/testData/codegen/boxWithJava/platformStatic/annotations/simpleClassObject.kt +++ b/compiler/testData/codegen/boxWithJava/platformStatic/annotations/simpleClassObject.kt @@ -8,14 +8,14 @@ class A { companion object { val b: String = "OK" - JvmStatic testAnnotation fun test1() = b + @JvmStatic @testAnnotation fun test1() = b } } object B { val b: String = "OK" - JvmStatic testAnnotation fun test1() = b + @JvmStatic @testAnnotation fun test1() = b } fun box(): String { diff --git a/compiler/testData/codegen/boxWithJava/platformStatic/classObject/simpleClassObject.kt b/compiler/testData/codegen/boxWithJava/platformStatic/classObject/simpleClassObject.kt index e5b3ca38ff1..72b3776dabf 100644 --- a/compiler/testData/codegen/boxWithJava/platformStatic/classObject/simpleClassObject.kt +++ b/compiler/testData/codegen/boxWithJava/platformStatic/classObject/simpleClassObject.kt @@ -5,13 +5,13 @@ class A { companion object { val b: String = "OK" - JvmStatic val c: String = "OK" + @JvmStatic val c: String = "OK" - JvmStatic fun test1() = b + @JvmStatic fun test1() = b - JvmStatic fun test2() = b + @JvmStatic fun test2() = b - JvmStatic fun String.test3() = this + b + @JvmStatic fun String.test3() = this + b } } diff --git a/compiler/testData/codegen/boxWithJava/platformStatic/enumCompanion/enumCompanionObject.kt b/compiler/testData/codegen/boxWithJava/platformStatic/enumCompanion/enumCompanionObject.kt index 4719653fbcd..37386fb99f4 100644 --- a/compiler/testData/codegen/boxWithJava/platformStatic/enumCompanion/enumCompanionObject.kt +++ b/compiler/testData/codegen/boxWithJava/platformStatic/enumCompanion/enumCompanionObject.kt @@ -5,9 +5,9 @@ enum class A { companion object { val foo: String = "OK" - JvmStatic val bar: String = "OK" + @JvmStatic val bar: String = "OK" - JvmStatic fun baz() = foo + @JvmStatic fun baz() = foo } } diff --git a/compiler/testData/codegen/boxWithJava/platformStatic/object/simpleObject.kt b/compiler/testData/codegen/boxWithJava/platformStatic/object/simpleObject.kt index 2986f0b2e7e..0ed7a005f11 100644 --- a/compiler/testData/codegen/boxWithJava/platformStatic/object/simpleObject.kt +++ b/compiler/testData/codegen/boxWithJava/platformStatic/object/simpleObject.kt @@ -4,13 +4,13 @@ object A { val b: String = "OK" - JvmStatic val c: String = "OK" + @JvmStatic val c: String = "OK" - JvmStatic fun test1() = b + @JvmStatic fun test1() = b - JvmStatic fun test2() = b + @JvmStatic fun test2() = b - JvmStatic fun String.test3() = this + b + @JvmStatic fun String.test3() = this + b } fun box(): String { diff --git a/compiler/testData/codegen/boxWithStdlib/annotations/annotationsOnDefault.kt b/compiler/testData/codegen/boxWithStdlib/annotations/annotationsOnDefault.kt index ed788ce7dde..02bea707f18 100644 --- a/compiler/testData/codegen/boxWithStdlib/annotations/annotationsOnDefault.kt +++ b/compiler/testData/codegen/boxWithStdlib/annotations/annotationsOnDefault.kt @@ -3,9 +3,9 @@ import kotlin.test.assertEquals @Retention(AnnotationRetention.RUNTIME) annotation class Ann(val x: Int) class A { - Ann(1) fun foo(x: Int, y: Int = 2, z: Int) {} + @Ann(1) fun foo(x: Int, y: Int = 2, z: Int) {} - Ann(1) constructor(x: Int, y: Int = 2, z: Int) + @Ann(1) constructor(x: Int, y: Int = 2, z: Int) } class B @Ann(1) constructor(x: Int, y: Int = 2, z: Int) {} diff --git a/compiler/testData/codegen/boxWithStdlib/annotations/defaultParameterValues.kt b/compiler/testData/codegen/boxWithStdlib/annotations/defaultParameterValues.kt index c5c879420e4..1b40bdcfc35 100644 --- a/compiler/testData/codegen/boxWithStdlib/annotations/defaultParameterValues.kt +++ b/compiler/testData/codegen/boxWithStdlib/annotations/defaultParameterValues.kt @@ -33,4 +33,4 @@ enum class MyEnum { class A -Ann class MyClass +@Ann class MyClass diff --git a/compiler/testData/codegen/boxWithStdlib/annotations/kotlinPropertyFromClassObjectAsParameter.kt b/compiler/testData/codegen/boxWithStdlib/annotations/kotlinPropertyFromClassObjectAsParameter.kt index 1d32bb96180..3c573bdfd83 100644 --- a/compiler/testData/codegen/boxWithStdlib/annotations/kotlinPropertyFromClassObjectAsParameter.kt +++ b/compiler/testData/codegen/boxWithStdlib/annotations/kotlinPropertyFromClassObjectAsParameter.kt @@ -1,4 +1,4 @@ -Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b, Foo.bool, Foo.c, Foo.str) class MyClass +@Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b, Foo.bool, Foo.c, Foo.str) class MyClass fun box(): String { val ann = javaClass().getAnnotation(javaClass()) diff --git a/compiler/testData/codegen/boxWithStdlib/annotations/kotlinTopLevelPropertyAsParameter.kt b/compiler/testData/codegen/boxWithStdlib/annotations/kotlinTopLevelPropertyAsParameter.kt index ab688eff539..71e312709a1 100644 --- a/compiler/testData/codegen/boxWithStdlib/annotations/kotlinTopLevelPropertyAsParameter.kt +++ b/compiler/testData/codegen/boxWithStdlib/annotations/kotlinTopLevelPropertyAsParameter.kt @@ -1,4 +1,4 @@ -Ann(i, s, f, d, l, b, bool, c, str) class MyClass +@Ann(i, s, f, d, l, b, bool, c, str) class MyClass fun box(): String { val ann = javaClass().getAnnotation(javaClass()) diff --git a/compiler/testData/codegen/boxWithStdlib/annotations/nestedClassPropertyAsParameter.kt b/compiler/testData/codegen/boxWithStdlib/annotations/nestedClassPropertyAsParameter.kt index cb99d7fc4f2..92902fa275c 100644 --- a/compiler/testData/codegen/boxWithStdlib/annotations/nestedClassPropertyAsParameter.kt +++ b/compiler/testData/codegen/boxWithStdlib/annotations/nestedClassPropertyAsParameter.kt @@ -1,4 +1,4 @@ -Ann(A.B.i) class MyClass +@Ann(A.B.i) class MyClass fun box(): String { val ann = javaClass().getAnnotation(javaClass()) diff --git a/compiler/testData/codegen/boxWithStdlib/annotations/parameterWithPrimitiveType.kt b/compiler/testData/codegen/boxWithStdlib/annotations/parameterWithPrimitiveType.kt index 7a10d8d0a73..732c3d02ac1 100644 --- a/compiler/testData/codegen/boxWithStdlib/annotations/parameterWithPrimitiveType.kt +++ b/compiler/testData/codegen/boxWithStdlib/annotations/parameterWithPrimitiveType.kt @@ -24,4 +24,4 @@ fun box(): String { return "OK" } -Ann(1, 1, 1, 1.0.toFloat(), 1.0, 1, 'c', true) class MyClass +@Ann(1, 1, 1, 1.0.toFloat(), 1.0, 1, 'c', true) class MyClass diff --git a/compiler/testData/codegen/boxWithStdlib/annotations/propertyWithPropertyInInitializerAsParameter.kt b/compiler/testData/codegen/boxWithStdlib/annotations/propertyWithPropertyInInitializerAsParameter.kt index 0f8c9a00474..e36875b6351 100644 --- a/compiler/testData/codegen/boxWithStdlib/annotations/propertyWithPropertyInInitializerAsParameter.kt +++ b/compiler/testData/codegen/boxWithStdlib/annotations/propertyWithPropertyInInitializerAsParameter.kt @@ -1,4 +1,4 @@ -Ann(i) class MyClass +@Ann(i) class MyClass fun box(): String { val ann = javaClass().getAnnotation(javaClass()) diff --git a/compiler/testData/codegen/boxWithStdlib/annotations/varargInAnnotationParameter.kt b/compiler/testData/codegen/boxWithStdlib/annotations/varargInAnnotationParameter.kt index ffa4269295e..8f069b9606d 100644 --- a/compiler/testData/codegen/boxWithStdlib/annotations/varargInAnnotationParameter.kt +++ b/compiler/testData/codegen/boxWithStdlib/annotations/varargInAnnotationParameter.kt @@ -1,19 +1,19 @@ @Retention(AnnotationRetention.RUNTIME) annotation class Ann(vararg val p: Int) -Ann() class MyClass1 -Ann(1) class MyClass2 -Ann(1, 2) class MyClass3 +@Ann() class MyClass1 +@Ann(1) class MyClass2 +@Ann(1, 2) class MyClass3 -Ann(*intArray()) class MyClass4 -Ann(*intArray(1)) class MyClass5 -Ann(*intArray(1, 2)) class MyClass6 +@Ann(*intArray()) class MyClass4 +@Ann(*intArray(1)) class MyClass5 +@Ann(*intArray(1, 2)) class MyClass6 -Ann(p = 1) class MyClass7 +@Ann(p = 1) class MyClass7 -Ann(p = *intArray()) class MyClass8 -Ann(p = *intArray(1)) class MyClass9 -Ann(p = *intArray(1, 2)) class MyClass10 +@Ann(p = *intArray()) class MyClass8 +@Ann(p = *intArray(1)) class MyClass9 +@Ann(p = *intArray(1, 2)) class MyClass10 fun box(): String { test(javaClass(), "") diff --git a/compiler/testData/codegen/boxWithStdlib/evaluate/char.kt b/compiler/testData/codegen/boxWithStdlib/evaluate/char.kt index 4b510bd5cc7..b4dc73e402d 100644 --- a/compiler/testData/codegen/boxWithStdlib/evaluate/char.kt +++ b/compiler/testData/codegen/boxWithStdlib/evaluate/char.kt @@ -3,7 +3,7 @@ package test @Retention(AnnotationRetention.RUNTIME) annotation class Ann(val c1: Int) -Ann('a' - 'a') class MyClass +@Ann('a' - 'a') class MyClass fun box(): String { val annotation = javaClass().getAnnotation(javaClass())!! diff --git a/compiler/testData/codegen/boxWithStdlib/evaluate/divide.kt b/compiler/testData/codegen/boxWithStdlib/evaluate/divide.kt index 6d2b09999b8..c40cb331a5b 100644 --- a/compiler/testData/codegen/boxWithStdlib/evaluate/divide.kt +++ b/compiler/testData/codegen/boxWithStdlib/evaluate/divide.kt @@ -6,7 +6,7 @@ annotation class Ann( val l: Long ) -Ann(1 / 1, 1 / 1, 1 / 1, 1 / 1) class MyClass +@Ann(1 / 1, 1 / 1, 1 / 1, 1 / 1) class MyClass fun box(): String { val annotation = javaClass().getAnnotation(javaClass())!! diff --git a/compiler/testData/codegen/boxWithStdlib/evaluate/infixCallBinary.kt b/compiler/testData/codegen/boxWithStdlib/evaluate/infixCallBinary.kt index 2f4ae485cf4..67dcb63d816 100644 --- a/compiler/testData/codegen/boxWithStdlib/evaluate/infixCallBinary.kt +++ b/compiler/testData/codegen/boxWithStdlib/evaluate/infixCallBinary.kt @@ -7,7 +7,7 @@ annotation class Ann( val p5: Int ) -Ann(1 plus 1, 1 minus 1, 1 times 1, 1 div 1, 1 mod 1) class MyClass +@Ann(1 plus 1, 1 minus 1, 1 times 1, 1 div 1, 1 mod 1) class MyClass fun box(): String { val annotation = javaClass().getAnnotation(javaClass())!! diff --git a/compiler/testData/codegen/boxWithStdlib/evaluate/intrincics.kt b/compiler/testData/codegen/boxWithStdlib/evaluate/intrincics.kt index 76cfb64934b..1c8e2cb8614 100644 --- a/compiler/testData/codegen/boxWithStdlib/evaluate/intrincics.kt +++ b/compiler/testData/codegen/boxWithStdlib/evaluate/intrincics.kt @@ -15,7 +15,7 @@ val prop4: Int = 1 shl 1 val prop5: Int = 1 shr 1 val prop6: Int = 1 ushr 1 -Ann(1 or 1, 1 and 1, 1 xor 1, 1 shl 1, 1 shr 1, 1 ushr 1) class MyClass +@Ann(1 or 1, 1 and 1, 1 xor 1, 1 shl 1, 1 shr 1, 1 ushr 1) class MyClass fun box(): String { val annotation = javaClass().getAnnotation(javaClass())!! diff --git a/compiler/testData/codegen/boxWithStdlib/evaluate/maxValue.kt b/compiler/testData/codegen/boxWithStdlib/evaluate/maxValue.kt index e15daaef4a7..04dfb4572f8 100644 --- a/compiler/testData/codegen/boxWithStdlib/evaluate/maxValue.kt +++ b/compiler/testData/codegen/boxWithStdlib/evaluate/maxValue.kt @@ -8,7 +8,7 @@ annotation class Ann( val p6: Long ) -Ann( +@Ann( p1 = java.lang.Byte.MAX_VALUE + 1, p2 = java.lang.Short.MAX_VALUE + 1, p3 = java.lang.Integer.MAX_VALUE + 1, diff --git a/compiler/testData/codegen/boxWithStdlib/evaluate/maxValueByte.kt b/compiler/testData/codegen/boxWithStdlib/evaluate/maxValueByte.kt index dcbae9cc72c..e12e8efbfda 100644 --- a/compiler/testData/codegen/boxWithStdlib/evaluate/maxValueByte.kt +++ b/compiler/testData/codegen/boxWithStdlib/evaluate/maxValueByte.kt @@ -6,7 +6,7 @@ annotation class Ann( val p5: Int ) -Ann( +@Ann( p1 = java.lang.Byte.MAX_VALUE + 1, p2 = 1 + 1, p4 = 1 + 1, diff --git a/compiler/testData/codegen/boxWithStdlib/evaluate/maxValueInt.kt b/compiler/testData/codegen/boxWithStdlib/evaluate/maxValueInt.kt index ea6ebe878b9..bff65a8a5a5 100644 --- a/compiler/testData/codegen/boxWithStdlib/evaluate/maxValueInt.kt +++ b/compiler/testData/codegen/boxWithStdlib/evaluate/maxValueInt.kt @@ -6,7 +6,7 @@ annotation class Ann( val p5: Int ) -Ann( +@Ann( p1 = java.lang.Integer.MAX_VALUE + 1, p2 = 1 + 1, p4 = 1 + 1, diff --git a/compiler/testData/codegen/boxWithStdlib/evaluate/miltiply.kt b/compiler/testData/codegen/boxWithStdlib/evaluate/miltiply.kt index f8c474f721b..dd018618bce 100644 --- a/compiler/testData/codegen/boxWithStdlib/evaluate/miltiply.kt +++ b/compiler/testData/codegen/boxWithStdlib/evaluate/miltiply.kt @@ -15,7 +15,7 @@ val prop4: Long = 1 * 1 val prop5: Double = 1.0 * 1.0 val prop6: Float = 1.0.toFloat() * 1.0.toFloat() -Ann(1 * 1, 1 * 1, 1 * 1, 1 * 1, 1.0 * 1.0, 1.0.toFloat() * 1.0.toFloat()) class MyClass +@Ann(1 * 1, 1 * 1, 1 * 1, 1 * 1, 1.0 * 1.0, 1.0.toFloat() * 1.0.toFloat()) class MyClass fun box(): String { val annotation = javaClass().getAnnotation(javaClass())!! diff --git a/compiler/testData/codegen/boxWithStdlib/evaluate/minus.kt b/compiler/testData/codegen/boxWithStdlib/evaluate/minus.kt index 85da590d855..98d65685929 100644 --- a/compiler/testData/codegen/boxWithStdlib/evaluate/minus.kt +++ b/compiler/testData/codegen/boxWithStdlib/evaluate/minus.kt @@ -15,7 +15,7 @@ val prop4: Long = 1 - 1 val prop5: Double = 1.0 - 1.0 val prop6: Float = 1.0.toFloat() - 1.0.toFloat() -Ann(1 - 1, 1 - 1, 1 - 1, 1 - 1, 1.0 - 1.0, 1.0.toFloat() - 1.0.toFloat()) class MyClass +@Ann(1 - 1, 1 - 1, 1 - 1, 1 - 1, 1.0 - 1.0, 1.0.toFloat() - 1.0.toFloat()) class MyClass fun box(): String { val annotation = javaClass().getAnnotation(javaClass())!! diff --git a/compiler/testData/codegen/boxWithStdlib/evaluate/mod.kt b/compiler/testData/codegen/boxWithStdlib/evaluate/mod.kt index be245c245ac..43b7d5a953f 100644 --- a/compiler/testData/codegen/boxWithStdlib/evaluate/mod.kt +++ b/compiler/testData/codegen/boxWithStdlib/evaluate/mod.kt @@ -15,7 +15,7 @@ val prop4: Long = 1 % 1 val prop5: Double = 1.0 % 1.0 val prop6: Float = 1.0.toFloat() % 1.0.toFloat() -Ann(1 % 1, 1 % 1, 1 % 1, 1 % 1, 1.0 % 1.0, 1.0.toFloat() % 1.0.toFloat()) class MyClass +@Ann(1 % 1, 1 % 1, 1 % 1, 1 % 1, 1.0 % 1.0, 1.0.toFloat() % 1.0.toFloat()) class MyClass fun box(): String { val annotation = javaClass().getAnnotation(javaClass())!! diff --git a/compiler/testData/codegen/boxWithStdlib/evaluate/paranthesized.kt b/compiler/testData/codegen/boxWithStdlib/evaluate/paranthesized.kt index 8410ec34dcf..d62ca4ba32c 100644 --- a/compiler/testData/codegen/boxWithStdlib/evaluate/paranthesized.kt +++ b/compiler/testData/codegen/boxWithStdlib/evaluate/paranthesized.kt @@ -15,7 +15,7 @@ val prop4: Long = (1 + 2) * 2 val prop5: Double = (1.0 + 2) * 2 val prop6: Float = (1.toFloat() + 2) * 2 -Ann((1 + 2) * 2, (1 + 2) * 2, (1 + 2) * 2, (1 + 2) * 2, (1.0 + 2) * 2, (1.toFloat() + 2) * 2) class MyClass +@Ann((1 + 2) * 2, (1 + 2) * 2, (1 + 2) * 2, (1 + 2) * 2, (1.0 + 2) * 2, (1.toFloat() + 2) * 2) class MyClass fun box(): String { val annotation = javaClass().getAnnotation(javaClass())!! diff --git a/compiler/testData/codegen/boxWithStdlib/evaluate/plus.kt b/compiler/testData/codegen/boxWithStdlib/evaluate/plus.kt index 188bc1b5544..7c66cea2034 100644 --- a/compiler/testData/codegen/boxWithStdlib/evaluate/plus.kt +++ b/compiler/testData/codegen/boxWithStdlib/evaluate/plus.kt @@ -15,7 +15,7 @@ val prop4: Long = 1 + 1 val prop5: Double = 1.0 + 1.0 val prop6: Float = 1.0.toFloat() + 1.0.toFloat() -Ann(1 + 1, 1 + 1, 1 + 1, 1 + 1, 1.0 + 1.0, 1.0.toFloat() + 1.0.toFloat()) class MyClass +@Ann(1 + 1, 1 + 1, 1 + 1, 1 + 1, 1.0 + 1.0, 1.0.toFloat() + 1.0.toFloat()) class MyClass fun box(): String { val annotation = javaClass().getAnnotation(javaClass())!! diff --git a/compiler/testData/codegen/boxWithStdlib/evaluate/simpleCallBinary.kt b/compiler/testData/codegen/boxWithStdlib/evaluate/simpleCallBinary.kt index 8b6600de754..76e05e967bf 100644 --- a/compiler/testData/codegen/boxWithStdlib/evaluate/simpleCallBinary.kt +++ b/compiler/testData/codegen/boxWithStdlib/evaluate/simpleCallBinary.kt @@ -13,7 +13,7 @@ val prop3: Int = 1.times(1) val prop4: Int = 1.div(1) val prop5: Int = 1.mod(1) -Ann(prop1, prop2, prop3, prop4, prop5) class MyClass +@Ann(prop1, prop2, prop3, prop4, prop5) class MyClass fun box(): String { val annotation = javaClass().getAnnotation(javaClass())!! diff --git a/compiler/testData/codegen/boxWithStdlib/evaluate/unaryMinus.kt b/compiler/testData/codegen/boxWithStdlib/evaluate/unaryMinus.kt index fe5195ce31e..71677bb9048 100644 --- a/compiler/testData/codegen/boxWithStdlib/evaluate/unaryMinus.kt +++ b/compiler/testData/codegen/boxWithStdlib/evaluate/unaryMinus.kt @@ -15,7 +15,7 @@ val prop4: Long = -1 val prop5: Double = -1.0 val prop6: Float = -1.0.toFloat() -Ann(prop1, prop2, prop3, prop4, prop5, prop6) class MyClass +@Ann(prop1, prop2, prop3, prop4, prop5, prop6) class MyClass fun box(): String { val annotation = javaClass().getAnnotation(javaClass())!! diff --git a/compiler/testData/codegen/boxWithStdlib/evaluate/unaryPlus.kt b/compiler/testData/codegen/boxWithStdlib/evaluate/unaryPlus.kt index 9146f996839..63c80f14565 100644 --- a/compiler/testData/codegen/boxWithStdlib/evaluate/unaryPlus.kt +++ b/compiler/testData/codegen/boxWithStdlib/evaluate/unaryPlus.kt @@ -15,7 +15,7 @@ val prop4: Long = +1 val prop5: Double = +1.0 val prop6: Float = +1.0.toFloat() -Ann(prop1, prop2, prop3, prop4, prop5, prop6) class MyClass +@Ann(prop1, prop2, prop3, prop4, prop5, prop6) class MyClass fun box(): String { val annotation = javaClass().getAnnotation(javaClass())!! diff --git a/compiler/testData/codegen/boxWithStdlib/fullJdk/native/default.kt b/compiler/testData/codegen/boxWithStdlib/fullJdk/native/default.kt index a79a3a3f6ad..7673e836313 100644 --- a/compiler/testData/codegen/boxWithStdlib/fullJdk/native/default.kt +++ b/compiler/testData/codegen/boxWithStdlib/fullJdk/native/default.kt @@ -6,7 +6,7 @@ import kotlin.platform.* object ObjWithNative { external fun foo(x: Int = 1): Double - platformStatic external fun bar(l: Long, s: String = ""): Double + @platformStatic external fun bar(l: Long, s: String = ""): Double } external fun topLevel(x: Int = 1): Double diff --git a/compiler/testData/codegen/boxWithStdlib/fullJdk/native/privateStatic.kt b/compiler/testData/codegen/boxWithStdlib/fullJdk/native/privateStatic.kt index 5cfb2b880ff..7ffa186034b 100644 --- a/compiler/testData/codegen/boxWithStdlib/fullJdk/native/privateStatic.kt +++ b/compiler/testData/codegen/boxWithStdlib/fullJdk/native/privateStatic.kt @@ -3,7 +3,7 @@ import kotlin.platform.* class C { companion object { - private platformStatic external fun foo() + private @platformStatic external fun foo() } fun bar() { diff --git a/compiler/testData/codegen/boxWithStdlib/fullJdk/native/staticNative.kt b/compiler/testData/codegen/boxWithStdlib/fullJdk/native/staticNative.kt index 2d1d4bd15d8..08a77c559b8 100644 --- a/compiler/testData/codegen/boxWithStdlib/fullJdk/native/staticNative.kt +++ b/compiler/testData/codegen/boxWithStdlib/fullJdk/native/staticNative.kt @@ -5,12 +5,12 @@ import kotlin.platform.* class WithNative { companion object { - platformStatic external fun bar(l: Long, s: String): Double + @platformStatic external fun bar(l: Long, s: String): Double } } object ObjWithNative { - platformStatic external fun bar(l: Long, s: String): Double + @platformStatic external fun bar(l: Long, s: String): Double } fun box(): String { diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/callableRef.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/callableRef.kt index 346de4cd500..aaa5e3b513e 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/callableRef.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/callableRef.kt @@ -4,13 +4,13 @@ object A { val b: String = "OK" - platformStatic var c: String = "Fail" + @platformStatic var c: String = "Fail" - platformStatic fun test1() : String { + @platformStatic fun test1() : String { return b } - platformStatic fun test2() : String { + @platformStatic fun test2() : String { return test1() } @@ -18,11 +18,11 @@ object A { return "1".test5() } - platformStatic fun test4(): String { + @platformStatic fun test4(): String { return "1".test5() } - platformStatic fun String.test5() : String { + @platformStatic fun String.test5() : String { return this + b } } diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/closure.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/closure.kt index 5e4a364bd17..fd341fd30fd 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/closure.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/closure.kt @@ -4,13 +4,13 @@ object A { val b: String = "OK" - platformStatic val c: String = "OK" + @platformStatic val c: String = "OK" - platformStatic fun test1() : String { + @platformStatic fun test1() : String { return {b}() } - platformStatic fun test2() : String { + @platformStatic fun test2() : String { return {test1()}() } @@ -18,11 +18,11 @@ object A { return {"1".test5()}() } - platformStatic fun test4(): String { + @platformStatic fun test4(): String { return {"1".test5()}() } - platformStatic fun String.test5() : String { + @platformStatic fun String.test5() : String { return {this + b}() } diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/convention.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/convention.kt index 7dd0d6ab328..031eb58af6a 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/convention.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/convention.kt @@ -10,7 +10,7 @@ object A { v += B(1000) } - platformStatic fun B.plusAssign(b: B) { + @platformStatic fun B.plusAssign(b: B) { this.s += b.s } } diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/default.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/default.kt index b4892461353..1062c340835 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/default.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/default.kt @@ -2,7 +2,7 @@ import kotlin.platform.platformStatic object A { - platformStatic fun test(b: String = "OK") : String { + @platformStatic fun test(b: String = "OK") : String { return b } } diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/explicitObject.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/explicitObject.kt index 1f7d9f09d10..7a02908647f 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/explicitObject.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/explicitObject.kt @@ -2,9 +2,9 @@ import kotlin.platform.platformStatic object AX { - platformStatic val c: String = "OK" + @platformStatic val c: String = "OK" - platformStatic fun aStatic(): String { + @platformStatic fun aStatic(): String { return AX.b() } @@ -12,7 +12,7 @@ object AX { return AX.b() } - platformStatic fun b(): String { + @platformStatic fun b(): String { return "OK" } diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/funAccess.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/funAccess.kt index 203aa68e337..1b7c7f1652f 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/funAccess.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/funAccess.kt @@ -8,7 +8,7 @@ fun getA(): A { } object A { - platformStatic fun a(): String { + @platformStatic fun a(): String { return holder } } diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/inline.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/inline.kt index 4b1a20f3d39..64649ebba7c 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/inline.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/inline.kt @@ -2,7 +2,7 @@ import kotlin.platform.platformStatic object A { - platformStatic inline fun test(b: String = "OK") : String { + @platformStatic inline fun test(b: String = "OK") : String { return b } } diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/postfixInc.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/postfixInc.kt index 58d53ef9a19..0e220c5314f 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/postfixInc.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/postfixInc.kt @@ -2,7 +2,7 @@ import kotlin.platform.platformStatic object A { - platformStatic var a: Int = 1 + @platformStatic var a: Int = 1 var b: Int = 1 @platformStatic get diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/prefixInc.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/prefixInc.kt index 42c1f283fa5..920367ee0c0 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/prefixInc.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/prefixInc.kt @@ -2,7 +2,7 @@ import kotlin.platform.platformStatic object A { - platformStatic var a: Int = 1 + @platformStatic var a: Int = 1 var b: Int = 1 @platformStatic get diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/privateMethod.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/privateMethod.kt index 9b0ada16440..101e87b5664 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/privateMethod.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/privateMethod.kt @@ -2,7 +2,7 @@ import kotlin.platform.platformStatic object A { - private platformStatic fun a(): String { + private @platformStatic fun a(): String { return "OK" } diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/propertyAccess.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/propertyAccess.kt index be4ade19fa6..e182f073f1c 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/propertyAccess.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/propertyAccess.kt @@ -9,7 +9,7 @@ fun getA(): A { object A { - platformStatic var a: Int = 1 + @platformStatic var a: Int = 1 var b: Int = 1 @platformStatic get diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/propertyAsDefault.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/propertyAsDefault.kt index 91337f476b2..819790951c9 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/propertyAsDefault.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/propertyAsDefault.kt @@ -1,7 +1,7 @@ import kotlin.platform.platformStatic object X { - platformStatic val x = "OK" + @platformStatic val x = "OK" fun fn(value : String = x): String = value } diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/simple.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/simple.kt index ca70adfa162..8a2ac4d42dc 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/simple.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/simple.kt @@ -4,13 +4,13 @@ object A { val b: String = "OK" - platformStatic val c: String = "OK" + @platformStatic val c: String = "OK" - platformStatic fun test1() : String { + @platformStatic fun test1() : String { return b } - platformStatic fun test2() : String { + @platformStatic fun test2() : String { return test1() } @@ -18,11 +18,11 @@ object A { return "1".test5() } - platformStatic fun test4(): String { + @platformStatic fun test4(): String { return "1".test5() } - platformStatic fun String.test5() : String { + @platformStatic fun String.test5() : String { return this + b } } diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/syntheticAccessor.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/syntheticAccessor.kt index d54d503f2ad..0cb5cc05a08 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/syntheticAccessor.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/syntheticAccessor.kt @@ -2,7 +2,7 @@ import kotlin.platform.* class C { companion object { - private platformStatic fun foo(): String { + private @platformStatic fun foo(): String { return "OK" } } diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/call/disallowNullValueForNotNullField.kt b/compiler/testData/codegen/boxWithStdlib/reflection/call/disallowNullValueForNotNullField.kt index 13cdc93d5f0..5374490ef68 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/call/disallowNullValueForNotNullField.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/call/disallowNullValueForNotNullField.kt @@ -1,13 +1,13 @@ import kotlin.reflect.* import kotlin.reflect.jvm.* -import kotlin.platform.platformStatic as static +import kotlin.jvm.JvmStatic as static class A { private var foo: String = "" } object O { - private static var bar: String = "" + private @static var bar: String = "" } class CounterTest(t: T) { diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/call/incorrectNumberOfArguments.kt b/compiler/testData/codegen/boxWithStdlib/reflection/call/incorrectNumberOfArguments.kt index 4790215c112..f815b06826f 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/call/incorrectNumberOfArguments.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/call/incorrectNumberOfArguments.kt @@ -1,4 +1,4 @@ -import kotlin.platform.platformStatic as static +import kotlin.jvm.JvmStatic as static import kotlin.reflect.jvm.isAccessible import kotlin.reflect.KCallable @@ -9,9 +9,9 @@ class A(private var bar: String = "") { } object O { - private static var baz: String = "" + private @static var baz: String = "" - static fun getBaz() = O::baz.apply { isAccessible = true } + @static fun getBaz() = O::baz.apply { isAccessible = true } } fun check(callable: KCallable<*>, vararg args: Any?) { diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/call/platformStatic.kt b/compiler/testData/codegen/boxWithStdlib/reflection/call/platformStatic.kt index 86d167a68f6..1c5f0d28a86 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/call/platformStatic.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/call/platformStatic.kt @@ -1,12 +1,12 @@ -import kotlin.platform.platformStatic as static +import kotlin.jvm.JvmStatic as static object Obj { - static fun foo() {} + @static fun foo() {} } class C { companion object { - static fun bar() {} + @static fun bar() {} } } diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/call/platformStaticInObjectIncorrectReceiver.kt b/compiler/testData/codegen/boxWithStdlib/reflection/call/platformStaticInObjectIncorrectReceiver.kt index 936aaa1b3b3..655765bbc1b 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/call/platformStaticInObjectIncorrectReceiver.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/call/platformStaticInObjectIncorrectReceiver.kt @@ -1,9 +1,9 @@ -import kotlin.platform.platformStatic as static +import kotlin.jvm.JvmStatic as static object Obj { - static fun foo(s: String) {} - static fun bar() {} - static fun sly(obj: Obj) {} + @static fun foo(s: String) {} + @static fun bar() {} + @static fun sly(obj: Obj) {} } fun box(): String { diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/call/returnUnit.kt b/compiler/testData/codegen/boxWithStdlib/reflection/call/returnUnit.kt index 05896d200fe..69a0e0e3ba6 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/call/returnUnit.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/call/returnUnit.kt @@ -7,7 +7,7 @@ class A { } object O { - kotlin.platform.platformStatic fun baz() {} + @kotlin.platform.platformStatic fun baz() {} } fun nullableUnit(unit: Boolean): Unit? = if (unit) Unit else null diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/callBy/platformStaticInObject.kt b/compiler/testData/codegen/boxWithStdlib/reflection/callBy/platformStaticInObject.kt index 72ac105e23e..e7989a4f0f7 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/callBy/platformStaticInObject.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/callBy/platformStaticInObject.kt @@ -1,8 +1,8 @@ -import kotlin.platform.platformStatic as static +import kotlin.jvm.JvmStatic as static import kotlin.test.assertEquals object Obj { - static fun foo(a: String, b: String = "b") = a + b + @static fun foo(a: String, b: String = "b") = a + b } fun box(): String { diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/kClassInAnnotation/array.kt b/compiler/testData/codegen/boxWithStdlib/reflection/kClassInAnnotation/array.kt index d2fcad3577b..337479b18ef 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/kClassInAnnotation/array.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/kClassInAnnotation/array.kt @@ -6,7 +6,7 @@ annotation class Ann(val args: Array>) class O class K -Ann(array(O::class, K::class)) class MyClass +@Ann(array(O::class, K::class)) class MyClass fun box(): String { val args = javaClass().getAnnotation(javaClass()).args diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/kClassInAnnotation/basic.kt b/compiler/testData/codegen/boxWithStdlib/reflection/kClassInAnnotation/basic.kt index c8cdfade719..05efcc9ada1 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/kClassInAnnotation/basic.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/kClassInAnnotation/basic.kt @@ -5,7 +5,7 @@ annotation class Ann(val arg: KClass<*>) class OK -Ann(OK::class) class MyClass +@Ann(OK::class) class MyClass fun box(): String { val argName = javaClass().getAnnotation(javaClass()).arg.simpleName ?: "fail 1" diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/kClassInAnnotation/vararg.kt b/compiler/testData/codegen/boxWithStdlib/reflection/kClassInAnnotation/vararg.kt index bf68266a768..2e6311852d2 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/kClassInAnnotation/vararg.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/kClassInAnnotation/vararg.kt @@ -6,7 +6,7 @@ annotation class Ann(vararg val args: KClass<*>) class O class K -Ann(O::class, K::class) class MyClass +@Ann(O::class, K::class) class MyClass fun box(): String { val args = javaClass().getAnnotation(javaClass()).args diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/mapping/platformStatic/companionObjectFunction.kt b/compiler/testData/codegen/boxWithStdlib/reflection/mapping/platformStatic/companionObjectFunction.kt index 75598404ef1..33105805268 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/mapping/platformStatic/companionObjectFunction.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/mapping/platformStatic/companionObjectFunction.kt @@ -1,4 +1,4 @@ -import kotlin.platform.platformStatic as static +import kotlin.jvm.JvmStatic as static import kotlin.reflect.jvm.* import kotlin.test.assertEquals import kotlin.test.failsWith diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/mapping/platformStatic/objectFunction.kt b/compiler/testData/codegen/boxWithStdlib/reflection/mapping/platformStatic/objectFunction.kt index d912ee8a578..2b3d1d55fe8 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/mapping/platformStatic/objectFunction.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/mapping/platformStatic/objectFunction.kt @@ -1,4 +1,4 @@ -import kotlin.platform.platformStatic as static +import kotlin.jvm.JvmStatic as static import kotlin.reflect.jvm.* import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/mapping/types/memberFunctions.kt b/compiler/testData/codegen/boxWithStdlib/reflection/mapping/types/memberFunctions.kt index f59b9135c27..a587a6d97c5 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/mapping/types/memberFunctions.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/mapping/types/memberFunctions.kt @@ -1,4 +1,4 @@ -import kotlin.platform.platformStatic as static +import kotlin.jvm.JvmStatic as static import kotlin.reflect.jvm.javaType import kotlin.test.assertEquals @@ -7,7 +7,7 @@ class A { } object O { - static fun bar(a: A): String = "" + @static fun bar(a: A): String = "" } fun box(): String { diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/mapping/types/parameterizedTypes.kt b/compiler/testData/codegen/boxWithStdlib/reflection/mapping/types/parameterizedTypes.kt index 06e38a7b11c..0c63ccdbe2f 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/mapping/types/parameterizedTypes.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/mapping/types/parameterizedTypes.kt @@ -1,7 +1,7 @@ // FULL_JDK import java.lang.reflect.ParameterizedType -import kotlin.platform.platformStatic as static +import kotlin.jvm.JvmStatic as static import kotlin.reflect.* import kotlin.reflect.jvm.javaType import kotlin.test.assertEquals @@ -9,7 +9,7 @@ import kotlin.test.assertEquals class A(private var foo: List) object O { - private static var bar: List = listOf() + private @static var bar: List = listOf() } fun topLevel(): List = listOf() diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/mapping/types/propertyAccessors.kt b/compiler/testData/codegen/boxWithStdlib/reflection/mapping/types/propertyAccessors.kt index ce3dba31df8..18c6312763a 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/mapping/types/propertyAccessors.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/mapping/types/propertyAccessors.kt @@ -1,4 +1,4 @@ -import kotlin.platform.platformStatic as static +import kotlin.jvm.JvmStatic as static import kotlin.reflect.KMutableProperty import kotlin.reflect.jvm.javaType import kotlin.test.assertEquals @@ -6,7 +6,7 @@ import kotlin.test.assertEquals class A(private var foo: String) object O { - private static var bar: String = "" + private @static var bar: String = "" } fun box(): String { diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/properties/privatePlatformStaticVarInObject.kt b/compiler/testData/codegen/boxWithStdlib/reflection/properties/privatePlatformStaticVarInObject.kt index 4ccc89213f4..cfba807e447 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/properties/privatePlatformStaticVarInObject.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/properties/privatePlatformStaticVarInObject.kt @@ -1,9 +1,9 @@ import kotlin.reflect.* import kotlin.reflect.jvm.* -import kotlin.platform.platformStatic as static +import kotlin.jvm.JvmStatic as static object Obj { - private static var result: String = "Fail" + private @static var result: String = "Fail" } fun box(): String { diff --git a/compiler/testData/codegen/boxWithStdlib/regressions/kt1932.kt b/compiler/testData/codegen/boxWithStdlib/regressions/kt1932.kt index 4918a560d36..365bcdde4f5 100644 --- a/compiler/testData/codegen/boxWithStdlib/regressions/kt1932.kt +++ b/compiler/testData/codegen/boxWithStdlib/regressions/kt1932.kt @@ -4,7 +4,7 @@ import java.lang.annotation.Annotation annotation class foo(val name : String) class Test() { - foo("OK") fun hello(input : String) { + @foo("OK") fun hello(input : String) { } } diff --git a/compiler/testData/codegen/boxWithStdlib/reified/newArrayInt.kt b/compiler/testData/codegen/boxWithStdlib/reified/newArrayInt.kt index 10d5f1c9729..78f9e5e6b2f 100644 --- a/compiler/testData/codegen/boxWithStdlib/reified/newArrayInt.kt +++ b/compiler/testData/codegen/boxWithStdlib/reified/newArrayInt.kt @@ -1,6 +1,6 @@ import kotlin.InlineOption.* -inline fun createArray(n: Int, inlineOptions(ONLY_LOCAL_RETURN) block: () -> T): Array { +inline fun createArray(n: Int, crossinline block: () -> T): Array { return Array(n) { block() } } diff --git a/compiler/testData/codegen/boxWithStdlib/reified/recursiveNewArray.kt b/compiler/testData/codegen/boxWithStdlib/reified/recursiveNewArray.kt index b55671552f8..9c12393dc6e 100644 --- a/compiler/testData/codegen/boxWithStdlib/reified/recursiveNewArray.kt +++ b/compiler/testData/codegen/boxWithStdlib/reified/recursiveNewArray.kt @@ -1,11 +1,11 @@ import kotlin.InlineOption.* -inline fun createArray(n: Int, inlineOptions(ONLY_LOCAL_RETURN) block: () -> T): Array { +inline fun createArray(n: Int, crossinline block: () -> T): Array { return Array(n) { block() } } inline fun recursive( - inlineOptions(ONLY_LOCAL_RETURN) block: () -> R + crossinline block: () -> R ): Array { return createArray(5) { block() } } diff --git a/compiler/testData/codegen/boxWithStdlib/reified/sameIndexRecursive.kt b/compiler/testData/codegen/boxWithStdlib/reified/sameIndexRecursive.kt index f669fa83daa..a158cca7d7d 100644 --- a/compiler/testData/codegen/boxWithStdlib/reified/sameIndexRecursive.kt +++ b/compiler/testData/codegen/boxWithStdlib/reified/sameIndexRecursive.kt @@ -1,11 +1,11 @@ import kotlin.InlineOption.* -inline fun createArray(n: Int, inlineOptions(ONLY_LOCAL_RETURN) block: () -> Pair): Pair, Array> { +inline fun createArray(n: Int, crossinline block: () -> Pair): Pair, Array> { return Pair(Array(n) { block().first }, Array(n) { block().second }) } inline fun recursive( - inlineOptions(ONLY_LOCAL_RETURN) block: () -> R + crossinline block: () -> R ): Pair, Array> { return createArray(5) { Pair(block(), block()) } } diff --git a/compiler/testData/codegen/bytecodeText/annotationDefaultValue.kt b/compiler/testData/codegen/bytecodeText/annotationDefaultValue.kt index 09991929306..bdd8b24041b 100644 --- a/compiler/testData/codegen/bytecodeText/annotationDefaultValue.kt +++ b/compiler/testData/codegen/bytecodeText/annotationDefaultValue.kt @@ -1,5 +1,5 @@ annotation class Ann(val arg: String = "abc") -Ann class MyClass +@Ann class MyClass // 1 @LAnn;\(\) diff --git a/compiler/testData/codegen/bytecodeText/annotationJavaRetentionPolicyRuntime.kt b/compiler/testData/codegen/bytecodeText/annotationJavaRetentionPolicyRuntime.kt index 649f4d30daf..d4120804b17 100644 --- a/compiler/testData/codegen/bytecodeText/annotationJavaRetentionPolicyRuntime.kt +++ b/compiler/testData/codegen/bytecodeText/annotationJavaRetentionPolicyRuntime.kt @@ -1,9 +1,9 @@ import java.lang.annotation.Retention import java.lang.annotation.RetentionPolicy -Ann class MyClass +@Ann class MyClass -Retention(RetentionPolicy.RUNTIME) +@Retention(RetentionPolicy.RUNTIME) annotation class Ann // 1 @LAnn;() \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeText/annotationRetentionPolicyClass.kt b/compiler/testData/codegen/bytecodeText/annotationRetentionPolicyClass.kt index 68de7e48fb4..f5b211236ef 100644 --- a/compiler/testData/codegen/bytecodeText/annotationRetentionPolicyClass.kt +++ b/compiler/testData/codegen/bytecodeText/annotationRetentionPolicyClass.kt @@ -1,4 +1,4 @@ -Ann class MyClass +@Ann class MyClass @Retention(AnnotationRetention.BINARY) annotation class Ann diff --git a/compiler/testData/codegen/bytecodeText/annotationRetentionPolicyRuntime.kt b/compiler/testData/codegen/bytecodeText/annotationRetentionPolicyRuntime.kt index 7844342b6f7..40964d86a4c 100644 --- a/compiler/testData/codegen/bytecodeText/annotationRetentionPolicyRuntime.kt +++ b/compiler/testData/codegen/bytecodeText/annotationRetentionPolicyRuntime.kt @@ -1,4 +1,4 @@ -Ann class MyClass +@Ann class MyClass @Retention(AnnotationRetention.RUNTIME) annotation class Ann diff --git a/compiler/testData/codegen/bytecodeText/annotationRetentionPolicySource.kt b/compiler/testData/codegen/bytecodeText/annotationRetentionPolicySource.kt index 2c55e0526e6..c0e6b4e066b 100644 --- a/compiler/testData/codegen/bytecodeText/annotationRetentionPolicySource.kt +++ b/compiler/testData/codegen/bytecodeText/annotationRetentionPolicySource.kt @@ -1,4 +1,4 @@ -Ann class MyClass +@Ann class MyClass @Retention(AnnotationRetention.SOURCE) annotation class Ann diff --git a/compiler/testData/codegen/innerClassInfo/anonymousObjectInline.kt b/compiler/testData/codegen/innerClassInfo/anonymousObjectInline.kt index 25c7ef0ffb7..da4f21cd985 100644 --- a/compiler/testData/codegen/innerClassInfo/anonymousObjectInline.kt +++ b/compiler/testData/codegen/innerClassInfo/anonymousObjectInline.kt @@ -5,7 +5,7 @@ class A { inlineFun { "test" } } - inline fun inlineFun(inlineOptions(ONLY_LOCAL_RETURN) lambda: () -> Unit) { + inline fun inlineFun(crossinline lambda: () -> Unit) { val s = object { fun run() { lambda() diff --git a/compiler/testData/codegen/junit/kt1592.kt b/compiler/testData/codegen/junit/kt1592.kt index e84dbbb116e..8a07229118f 100644 --- a/compiler/testData/codegen/junit/kt1592.kt +++ b/compiler/testData/codegen/junit/kt1592.kt @@ -1,3 +1,3 @@ import org.junit.Test -Test fun foo(m : java.lang.reflect.Method) = "OK" +@Test fun foo(m : java.lang.reflect.Method) = "OK" diff --git a/compiler/testData/codegen/junit/kt2344.kt b/compiler/testData/codegen/junit/kt2344.kt index 4c3088991aa..d33451eaf65 100644 --- a/compiler/testData/codegen/junit/kt2344.kt +++ b/compiler/testData/codegen/junit/kt2344.kt @@ -2,7 +2,7 @@ import kotlin.test.* import org.junit.Test as test public class Test { - test fun f(): Unit { + @test fun f(): Unit { assertEquals(true, !false) } } diff --git a/compiler/testData/compileJavaAgainstKotlin/method/throws/DefaultArgs.kt b/compiler/testData/compileJavaAgainstKotlin/method/throws/DefaultArgs.kt index dabd56ef2a5..eb3b0e83f53 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/throws/DefaultArgs.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/throws/DefaultArgs.kt @@ -2,7 +2,7 @@ package test class E1: Exception() -Throws(E1::class) JvmOverloads +@Throws(E1::class) @JvmOverloads fun one(a: Int = 1) {} class One @Throws(E1::class) constructor(a: Int = 1) { diff --git a/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObject.kt b/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObject.kt index 9fe14bcf0ea..2eb43be3527 100644 --- a/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObject.kt +++ b/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObject.kt @@ -7,14 +7,14 @@ class A { companion object { val b: String = "OK" - platformStatic fun test1() { + @platformStatic fun test1() { b test2() test3() "".test4() } - platformStatic fun test2() { + @platformStatic fun test2() { b } @@ -22,7 +22,7 @@ class A { } - platformStatic fun String.test4() { + @platformStatic fun String.test4() { b } } diff --git a/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleObject.kt b/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleObject.kt index 546233c91ed..0386e00e355 100644 --- a/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleObject.kt +++ b/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleObject.kt @@ -6,14 +6,14 @@ object A { val b: String = "OK" - platformStatic fun test1() { + @platformStatic fun test1() { b test2() test3() "".test4() } - platformStatic fun test2() { + @platformStatic fun test2() { b } @@ -21,7 +21,7 @@ object A { } - platformStatic fun String.test4() { + @platformStatic fun String.test4() { b } } diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/library/source.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/library/source.kt index 1408b6d3618..0964f508972 100644 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/library/source.kt +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/library/source.kt @@ -4,4 +4,4 @@ enum class E { ENTRY } annotation class Anno(val e: E) -Anno(E.ENTRY) open class Class +@Anno(E.ENTRY) open class Class diff --git a/compiler/testData/compileKotlinAgainstKotlin/AnnotationInTrait.A.kt b/compiler/testData/compileKotlinAgainstKotlin/AnnotationInTrait.A.kt index 663ecf71ce3..0b3af596196 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/AnnotationInTrait.A.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/AnnotationInTrait.A.kt @@ -4,6 +4,6 @@ package a annotation class Ann interface Tr { - Ann + @Ann fun foo() {} } \ No newline at end of file diff --git a/compiler/testData/compileKotlinAgainstKotlin/InlinedConstants.B.kt b/compiler/testData/compileKotlinAgainstKotlin/InlinedConstants.B.kt index 4c341b87225..d57b275fa83 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/InlinedConstants.B.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/InlinedConstants.B.kt @@ -1,6 +1,6 @@ import constants.* -AnnotationClass("$b $s $i $l $f $d $bb $c $str") +@AnnotationClass("$b $s $i $l $f $d $bb $c $str") class DummyClass() fun main(args: Array) { diff --git a/compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.B.kt b/compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.B.kt index c1136d8f499..99b649f88ae 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.B.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.B.kt @@ -1,9 +1,9 @@ import a.* -Ann(i, s, f, d, l, b, bool, c, str) +@Ann(i, s, f, d, l, b, bool, c, str) class MyClass1 -Ann(i2, s2, f2, d2, l2, b2, bool2, c2, str2) +@Ann(i2, s2, f2, d2, l2, b2, bool2, c2, str2) class MyClass2 @Retention(AnnotationRetention.RUNTIME) diff --git a/compiler/testData/compileKotlinAgainstKotlin/PlatformStaticInObject.A.kt b/compiler/testData/compileKotlinAgainstKotlin/PlatformStaticInObject.A.kt index 518295f26e8..b54563c1891 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/PlatformStaticInObject.A.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/PlatformStaticInObject.A.kt @@ -4,7 +4,7 @@ import kotlin.jvm.* public object TestObject { - @jvmStatic + @JvmStatic public val test: String = "test" } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.kt b/compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.kt index 1f2b223bc9d..6a99570100b 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.kt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.kt @@ -1,10 +1,10 @@ annotation class A1 annotation class A2(val some: Int = 12) -class TopLevelClass<A1 A2(3) A2 A1(12) A2("Test") T> { - class InnerClass<A1 A2(3) A2 A1(12) A2("Test") T> { +class TopLevelClass<@A1 @A2(3) @A2 @A1(12) @A2("Test") T> { + class InnerClass<@A1 @A2(3) @A2 @A1(12) @A2("Test") T> { fun test() { - class InFun<A1 A2(3) A2 A1(12) A2("Test") T> + class InFun<@A1 @A2(3) @A2 @A1(12) @A2("Test") T> } } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotationForFunctionTypeParameter.kt b/compiler/testData/diagnostics/tests/annotations/AnnotationForFunctionTypeParameter.kt index bd48f9c7251..83cab8cd4ed 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotationForFunctionTypeParameter.kt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotationForFunctionTypeParameter.kt @@ -1,12 +1,12 @@ annotation class A1 annotation class A2(val some: Int = 12) -fun <A1 A2(3) A2 A1(12) A2("Test") T> topFun() = 12 +fun <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> topFun() = 12 class SomeClass { - fun <A1 A2(3) A2 A1(12) A2("Test") T> method() = 12 + fun <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> method() = 12 fun foo() { - fun <A1 A2(3) A2 A1(12) A2("Test") T> innerFun() = 12 + fun <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> innerFun() = 12 } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotationIdentifier.kt b/compiler/testData/diagnostics/tests/annotations/AnnotationIdentifier.kt index a6eedf82a62..2dca0da86f2 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotationIdentifier.kt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotationIdentifier.kt @@ -8,10 +8,6 @@ package test @test.annotation class annotation -@kotlin.annotation.annotation class realAnnotation - -@realAnnotation class My - // FILE: other/c.kt package other @@ -20,6 +16,4 @@ annotation class My @test.annotation class Your -@kotlin.annotation.annotation class His - @My class Our \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotationIdentifier.txt b/compiler/testData/diagnostics/tests/annotations/AnnotationIdentifier.txt index bc6206bff51..99f43131be9 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotationIdentifier.txt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotationIdentifier.txt @@ -9,13 +9,6 @@ kotlin.annotation.annotation() public final class annotation : kotlin.Annotation package other { - kotlin.annotation.annotation() public final class His : kotlin.Annotation { - public constructor His() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } - kotlin.annotation.annotation() public final class My : kotlin.Annotation { public constructor My() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -40,24 +33,10 @@ package other { package test { - test.realAnnotation() public final class My { - public constructor My() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } - test.annotation() public final class annotation { public constructor annotation() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - - kotlin.annotation.annotation() public final class realAnnotation : kotlin.Annotation { - public constructor realAnnotation() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } } diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotationsForPropertyTypeParameter.kt b/compiler/testData/diagnostics/tests/annotations/AnnotationsForPropertyTypeParameter.kt index dd4401942e4..a76a4739286 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotationsForPropertyTypeParameter.kt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotationsForPropertyTypeParameter.kt @@ -1,12 +1,12 @@ annotation class A1 annotation class A2(val some: Int = 12) -val <A1 A2(3) A2 A1(12) A2("Test") T> topProp = 12 +val <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> topProp = 12 class SomeClass { - val <A1 A2(3) A2 A1(12) A2("Test") T> field = 12 + val <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> field = 12 fun foo() { - val <A1 A2(3) A2 A1(12) A2("Test") T> localVal = 12 + val <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> localVal = 12 } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/DanglingMixed.kt b/compiler/testData/diagnostics/tests/annotations/DanglingMixed.kt index c7c019ed5f8..f3d759215d4 100644 --- a/compiler/testData/diagnostics/tests/annotations/DanglingMixed.kt +++ b/compiler/testData/diagnostics/tests/annotations/DanglingMixed.kt @@ -4,19 +4,19 @@ annotation class Ann2 class C { fun foo() { class Local { - Ann0 + @Ann0 @Ann @Ann3 - Ann2(1) + @Ann2(1) @Ann4 } } - Ann0 + @Ann0 @Ann @Ann3 - Ann2(1) + @Ann2(1) @Ann4 } -Ann0 +@Ann0 @Ann @Ann3 @Ann2(1) @Ann4 \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/DanglingNoBrackets.kt b/compiler/testData/diagnostics/tests/annotations/DanglingNoBrackets.kt index d9466b6f5f8..fe2e95895bd 100644 --- a/compiler/testData/diagnostics/tests/annotations/DanglingNoBrackets.kt +++ b/compiler/testData/diagnostics/tests/annotations/DanglingNoBrackets.kt @@ -3,11 +3,11 @@ annotation class Ann class C { fun foo() { class Local { - Ann + @Ann } } - Ann + @Ann } -Ann \ No newline at end of file +@Ann \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/forParameterAnnotationResolve.kt b/compiler/testData/diagnostics/tests/annotations/forParameterAnnotationResolve.kt index c63026094b5..bb03f70eb0d 100644 --- a/compiler/testData/diagnostics/tests/annotations/forParameterAnnotationResolve.kt +++ b/compiler/testData/diagnostics/tests/annotations/forParameterAnnotationResolve.kt @@ -10,5 +10,5 @@ fun foo() { for (@Ann(3) (x, @Ann(4) y) in bar()) {} - for (Err (x,y) in bar()) {} -} + for (@Err (x,y) in bar()) {} +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt b/compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt index 881e80b43f6..da18f76b658 100644 --- a/compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt +++ b/compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt @@ -1,9 +1,9 @@ -fun foo(varargs f : Int) {} +fun foo(varargs f : Int) {} var bar : Int = 1 - set(varargs v) {} + set(varargs v) {} val x : (Int) -> Int = {@varargs x : Int -> x} -class Hello(varargs args: Any) { +class Hello(varargs args: Any) { } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/onInitializer.kt b/compiler/testData/diagnostics/tests/annotations/onInitializer.kt index 07b7acc09dd..317f6187acf 100644 --- a/compiler/testData/diagnostics/tests/annotations/onInitializer.kt +++ b/compiler/testData/diagnostics/tests/annotations/onInitializer.kt @@ -1,14 +1,10 @@ class A { - ann init {} @ann init {} - aaa init {} @aaa init {} } interface T { - ann init {} @ann init {} - aaa init {} @aaa init {} } diff --git a/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt b/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt index 4fd4fe0b22d..1cde36927a2 100644 --- a/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt +++ b/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt @@ -1,4 +1,4 @@ -myAnnotation public package illegal_modifiers +@myAnnotation public package illegal_modifiers abstract class A() { abstract final fun f() @@ -83,9 +83,9 @@ abstract class IllegalModifiers6() { open init {} final init {} - public annotated init {} + public @annotated init {} - private IllegalModifiers6() init {} + private @IllegalModifiers6() init {} } // strange inappropriate modifiers usages diff --git a/compiler/testData/diagnostics/tests/regressions/ea66984.kt b/compiler/testData/diagnostics/tests/regressions/ea66984.kt index 07c3760a1f4..776c63fa07f 100644 --- a/compiler/testData/diagnostics/tests/regressions/ea66984.kt +++ b/compiler/testData/diagnostics/tests/regressions/ea66984.kt @@ -1,2 +1,2 @@ // !DIAGNOSTICS: -NO_VALUE_FOR_PARAMETER -class Tree(T element, Tree left, Tree right) {} \ No newline at end of file +class Tree(T element, Tree left, Tree right) {} \ No newline at end of file diff --git a/compiler/testData/integration/ant/jvm/failOnErrorByDefault/build.log.expected b/compiler/testData/integration/ant/jvm/failOnErrorByDefault/build.log.expected index 2c927cbab2a..cdf8ebedd06 100644 --- a/compiler/testData/integration/ant/jvm/failOnErrorByDefault/build.log.expected +++ b/compiler/testData/integration/ant/jvm/failOnErrorByDefault/build.log.expected @@ -3,6 +3,9 @@ Buildfile: [TestData]/build.xml build: [kotlinc] Compiling [[TestData]] => [[Temp]] + [kotlinc] [TestData]/incorrectKotlinCode.kt:1:1: error: use '@' symbol before annotations + [kotlinc] xxxx + [kotlinc] ^ [kotlinc] [TestData]/incorrectKotlinCode.kt:1:5: error: expecting a top level declaration [kotlinc] xxxx [kotlinc] ^ diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt b/compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt index 326a7f7e1a8..bfc4a23a0e9 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt @@ -2,5 +2,5 @@ package test public open class AnnotatedMethod() { - public open Deprecated("Deprecated in Java") fun f(): Unit { } + public open @Deprecated("Deprecated in Java") fun f(): Unit { } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt b/compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt index 9af533b28df..d944fd22331 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt @@ -8,5 +8,5 @@ annotation class EnumOption(val option: E) annotation class OptionGroups(val o1: StringOptions, val o2: EnumOption) -OptionGroups(StringOptions("abc", "d", "ef"), EnumOption(E.ENTRY)) +@OptionGroups(StringOptions("abc", "d", "ef"), EnumOption(E.ENTRY)) public class AnnotationInAnnotationArguments diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.kt b/compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.kt index 0f086e488ed..63aca9c0ce7 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.kt @@ -14,7 +14,7 @@ annotation class EnumAnno(val value: E) annotation class EnumArrayAnno(vararg val value: E) public class EnumArgumentWithCustomToString { - EnumAnno(E.CAKE) - EnumArrayAnno(E.CAKE, E.CAKE) + @EnumAnno(E.CAKE) + @EnumArrayAnno(E.CAKE, E.CAKE) fun annotated() {} } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt b/compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt index 5d51003f956..f039baccbd1 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt @@ -4,9 +4,9 @@ package test annotation class Anno(val s: String) interface T { - Anno("foo") + @Anno("foo") fun foo(): Array>> - Anno("bar") + @Anno("bar") val bar: Array> } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt index fde1b44b405..03e3678ed82 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt @@ -3,7 +3,7 @@ package test annotation class Anno class Class { - Anno val x: Int by object { + @Anno val x: Int by object { fun get(thiz: Class, data: PropertyMetadata) = null!! } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt index 3c61d660dc6..d7f25f79aeb 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt @@ -6,7 +6,7 @@ import java.lang.annotation.ElementType annotation class Anno(val t: ElementType) class Class { - Anno(ElementType.METHOD) fun foo() {} + @Anno(ElementType.METHOD) fun foo() {} @field:Anno(ElementType.FIELD) var bar = 42 } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt index ecb1631416f..ddaa364719d 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt @@ -3,5 +3,5 @@ package test annotation class Anno class Class { - Anno fun foo() { } + @Anno fun foo() { } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt index cfe2a312d62..dce175f835c 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt @@ -10,4 +10,4 @@ class A { } } -A.Companion.Anno1 A.Companion.B.Anno2 class C \ No newline at end of file +@A.Companion.Anno1 @A.Companion.B.Anno2 class C \ No newline at end of file diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt index 0980ccf0965..ac389e9fbd6 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt @@ -4,6 +4,6 @@ annotation class Anno class Class { companion object { - Anno class Nested + @Anno class Nested } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt index d4e56195e7d..19152f4c376 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt @@ -3,5 +3,5 @@ package test annotation class Anno class Class { - Anno companion object + @Anno companion object } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt index fed8773721d..3e955eb88a0 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt @@ -1,10 +1,10 @@ //ALLOW_AST_ACCESS package test -Deprecated("Class") class Class { - Deprecated("Nested") class Nested +@Deprecated("Class") class Class { + @Deprecated("Nested") class Nested - Deprecated("Inner") inner class Inner + @Deprecated("Inner") inner class Inner - Deprecated("companion object") companion object + @Deprecated("companion object") companion object } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt index 9425fc6d0e9..e2b60905c35 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt @@ -3,5 +3,5 @@ package test annotation class `$$$$$$` annotation class `Anno$tation` -`$$$$$$` class A -`Anno$tation` class `Cla$s` +@`$$$$$$` class A +@`Anno$tation` class `Cla$s` diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt index 14be4f84c5e..3325a3f9956 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt @@ -5,10 +5,10 @@ import java.lang.annotation.ElementType annotation class Anno(val t: ElementType) -Anno(ElementType.METHOD) class Class { - Anno(ElementType.PARAMETER) inner class Inner +@Anno(ElementType.METHOD) class Class { + @Anno(ElementType.PARAMETER) inner class Inner - Anno(ElementType.TYPE) class Nested + @Anno(ElementType.TYPE) class Nested - Anno(ElementType.ANNOTATION_TYPE) companion object + @Anno(ElementType.ANNOTATION_TYPE) companion object } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt index ea080c2cb51..ab2c72a24e0 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt @@ -4,4 +4,4 @@ annotation class A1 annotation class A2 annotation class A3 -A1 A2 A3 class Class +@A1 @A2 @A3 class Class diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt index 94abc114c8c..8092a4ceb4f 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt @@ -4,6 +4,6 @@ class A { annotation class Anno } -A.Anno class B { - A.Anno fun f() {} +@A.Anno class B { + @A.Anno fun f() {} } \ No newline at end of file diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt index 3ff87b98f91..f7d5e5a1bd3 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt @@ -3,7 +3,7 @@ package test annotation class Anno class Class { - Anno class Nested + @Anno class Nested - Anno inner class Inner + @Anno inner class Inner } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt index b8ff3970d67..3f30bf820c6 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt @@ -2,4 +2,4 @@ package test annotation class Anno -Anno class X +@Anno class X diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt index 81c670cfd99..24a3f70b4c9 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt @@ -10,12 +10,12 @@ annotation class BooleanAnno(val value: Boolean) annotation class FloatAnno(val value: Float) annotation class DoubleAnno(val value: Double) -IntAnno(42.toInt()) -ShortAnno(42.toShort()) -ByteAnno(42.toByte()) -LongAnno(42.toLong()) -CharAnno('A') -BooleanAnno(false) -FloatAnno(3.14.toFloat()) -DoubleAnno(3.14) +@IntAnno(42.toInt()) +@ShortAnno(42.toShort()) +@ByteAnno(42.toByte()) +@LongAnno(42.toLong()) +@CharAnno('A') +@BooleanAnno(false) +@FloatAnno(3.14.toFloat()) +@DoubleAnno(3.14) class Class diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt index 574addca007..38cafb917df 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt @@ -3,4 +3,4 @@ package test annotation class Anno(val int: Int, val string: String, val double: Double) -Anno(42.toInt(), "OK", 3.14.toDouble()) class Class +@Anno(42.toInt(), "OK", 3.14.toDouble()) class Class diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt index a6c9524e83b..cb10f5bc436 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt @@ -2,6 +2,6 @@ package test annotation class Anno -Anno val x: Int by object { +@Anno val x: Int by object { fun get(thiz: Any?, data: PropertyMetadata) = null!! } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt index f6bb748fe5b..ae391214429 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt @@ -5,6 +5,6 @@ import java.lang.annotation.ElementType annotation class Anno(val t: ElementType) -Anno(ElementType.METHOD) fun foo() {} +@Anno(ElementType.METHOD) fun foo() {} @field:Anno(ElementType.FIELD) val bar = 42 diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt index e6cc362b058..915b06b96a8 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt @@ -5,8 +5,8 @@ import java.lang.annotation.ElementType annotation class Anno(vararg val t: ElementType) -Anno(ElementType.METHOD, ElementType.FIELD) fun foo() {} +@Anno(ElementType.METHOD, ElementType.FIELD) fun foo() {} @field:Anno(ElementType.PACKAGE) val bar = 42 -Anno() fun baz() {} +@Anno() fun baz() {} diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt index 3935c047e7a..1727a62984c 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt @@ -2,4 +2,4 @@ package test annotation class Anno -Anno fun function() {} +@Anno fun function() {} diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt index deff0fcd5df..2bcebf84121 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt @@ -3,8 +3,8 @@ package test annotation class Anno(vararg val t: String) -Anno("live", "long") fun foo() {} +@Anno("live", "long") fun foo() {} @field:Anno("prosper") val bar = 42 -Anno() fun baz() {} +@Anno() fun baz() {} diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt index f26d6d2e7f1..9f342519e09 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt @@ -1,7 +1,7 @@ package test class Some { - TestAnnotation companion object { + @TestAnnotation companion object { annotation class TestAnnotation } } diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.kt b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.kt index a8c90f77529..0fedb930de7 100644 --- a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.kt +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.kt @@ -3,11 +3,11 @@ package test import org.jetbrains.annotations.* public interface LoadIterable { - Mutable + @Mutable public fun getIterable(): MutableIterable? public fun setIterable(@Mutable p0: MutableIterable?) - ReadOnly + @ReadOnly public fun getReadOnlyIterable(): Iterable? public fun setReadOnlyIterable(@ReadOnly p0: Iterable?) } diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.kt b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.kt index 0eb890d2980..2f71563b18c 100644 --- a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.kt +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.kt @@ -3,11 +3,11 @@ package test import org.jetbrains.annotations.* public interface LoadIterableWithNullability { - Mutable + @Mutable public fun getIterable(): MutableIterable public fun setIterable(@Mutable p0: MutableIterable) - ReadOnly + @ReadOnly public fun getReadOnlyIterable(): Iterable public fun setReadOnlyIterable(@ReadOnly p0: Iterable) } diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.kt b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.kt index 0900376775a..45df66a5873 100644 --- a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.kt +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.kt @@ -5,11 +5,11 @@ import org.jetbrains.annotations.* public interface LoadIterableWithPropagation { public interface LoadIterable { - Mutable + @Mutable public fun getIterable(): MutableIterable? public fun setIterable(@Mutable p0: MutableIterable?) - ReadOnly + @ReadOnly public fun getReadOnlyIterable(): Iterable? public fun setReadOnlyIterable(@ReadOnly p0: Iterable?) } diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames/functionName.kt b/compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames/functionName.kt index 8cccd3eedd0..2153834c8f8 100644 --- a/compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames/functionName.kt +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames/functionName.kt @@ -5,7 +5,7 @@ import kotlin.platform.* annotation class A(val s: String) @platformName("bar") -A("1") +@A("1") fun foo() = "foo" @field:A("2") diff --git a/compiler/testData/multiModule/java/custom/a/a.kt b/compiler/testData/multiModule/java/custom/a/a.kt index 983c11871c6..f954a30920f 100644 --- a/compiler/testData/multiModule/java/custom/a/a.kt +++ b/compiler/testData/multiModule/java/custom/a/a.kt @@ -7,5 +7,5 @@ public class KotlinA: AClass() { fun paramA(p: AClass) {} - AAnnotation fun annoA() {} + @AAnnotation fun annoA() {} } \ No newline at end of file diff --git a/compiler/testData/multiModule/java/custom/b/b.kt b/compiler/testData/multiModule/java/custom/b/b.kt index 00c669389ef..a0cbbbf1cd0 100644 --- a/compiler/testData/multiModule/java/custom/b/b.kt +++ b/compiler/testData/multiModule/java/custom/b/b.kt @@ -11,7 +11,7 @@ public class KotlinB: AClass() { public fun returnB(): BClass { } - AAnnotation fun annoA() {} + @AAnnotation fun annoA() {} - BAnnotation fun annoB() {} + @BAnnotation fun annoB() {} } \ No newline at end of file diff --git a/compiler/testData/multiModule/java/custom/c/c.kt b/compiler/testData/multiModule/java/custom/c/c.kt index 0e2260e75a0..4d8e03cc5e2 100644 --- a/compiler/testData/multiModule/java/custom/c/c.kt +++ b/compiler/testData/multiModule/java/custom/c/c.kt @@ -11,7 +11,7 @@ public class KotlinC: AClass() { public fun returnB(): BClass { } - AAnnotation fun annoA() {} + @AAnnotation fun annoA() {} - BAnnotation fun annoB() {} + @BAnnotation fun annoB() {} } \ No newline at end of file diff --git a/compiler/testData/renderer/GlobalFunctions.kt b/compiler/testData/renderer/GlobalFunctions.kt index 29cad885b87..9b4ccd6fa5b 100644 --- a/compiler/testData/renderer/GlobalFunctions.kt +++ b/compiler/testData/renderer/GlobalFunctions.kt @@ -17,7 +17,7 @@ interface Bar fun

funTypeParameterWithTwoUpperBounds() where P : Foo, P : Bar = 17 -Deprecated("") fun deprecatedFun() +@Deprecated("") fun deprecatedFun() //package rendererTest //public fun pub(): kotlin.Unit defined in rendererTest diff --git a/compiler/testData/renderer/GlobalProperties.kt b/compiler/testData/renderer/GlobalProperties.kt index 2214278b61f..74e3c62db99 100644 --- a/compiler/testData/renderer/GlobalProperties.kt +++ b/compiler/testData/renderer/GlobalProperties.kt @@ -11,7 +11,7 @@ private var private = 5 public val Int.ext: Int get() {} -Deprecated("") val deprecatedVal = 5 +@Deprecated("") val deprecatedVal = 5 public val T.extWithTwoUpperBounds: Int where T : CharSequence, T : Number get() {} diff --git a/compiler/testData/renderer/KeywordsInNames.kt b/compiler/testData/renderer/KeywordsInNames.kt index 1c33961a45e..ebfed59de79 100644 --- a/compiler/testData/renderer/KeywordsInNames.kt +++ b/compiler/testData/renderer/KeywordsInNames.kt @@ -2,7 +2,7 @@ annotation class `true` val `val` = 5 -`true` interface `interface` +@`true` interface `interface` class `class`<`in`>(p: `in`?) { inner class `class` diff --git a/compiler/testData/resolveAnnotations/parameters/byte.kt b/compiler/testData/resolveAnnotations/parameters/byte.kt index b953532f881..4db8be60cee 100644 --- a/compiler/testData/resolveAnnotations/parameters/byte.kt +++ b/compiler/testData/resolveAnnotations/parameters/byte.kt @@ -7,6 +7,6 @@ annotation class Ann( val b4: Byte ) -Ann(1, 1.toByte(), 128.toByte(), 128) class MyClass +@Ann(1, 1.toByte(), 128.toByte(), 128) class MyClass // EXPECTED: Ann(b1 = 1.toByte(), b2 = 1.toByte(), b3 = -128.toByte(), b4 = 128) \ No newline at end of file diff --git a/compiler/testData/resolveAnnotations/parameters/char.kt b/compiler/testData/resolveAnnotations/parameters/char.kt index 8f40cf237ca..e552f8f24c0 100644 --- a/compiler/testData/resolveAnnotations/parameters/char.kt +++ b/compiler/testData/resolveAnnotations/parameters/char.kt @@ -11,6 +11,6 @@ annotation class Ann( val b8: Float ) -Ann('c', 99.toChar(), 'c'.toInt(), 'c'.toLong(), 'c'.toByte(), 'c'.toShort(), 'c'.toDouble(), 'c'.toFloat()) class MyClass +@Ann('c', 99.toChar(), 'c'.toInt(), 'c'.toLong(), 'c'.toByte(), 'c'.toShort(), 'c'.toDouble(), 'c'.toFloat()) class MyClass // EXPECTED: Ann(b1 = \u0063 ('c'), b2 = \u0063 ('c'), b3 = 99, b4 = 99.toLong(), b5 = 99.toByte(), b6 = 99.toShort(), b7 = 99.0.toDouble(), b8 = 99.0.toFloat()) \ No newline at end of file diff --git a/compiler/testData/resolveAnnotations/parameters/double.kt b/compiler/testData/resolveAnnotations/parameters/double.kt index a46d740390b..1b3856ac1cf 100644 --- a/compiler/testData/resolveAnnotations/parameters/double.kt +++ b/compiler/testData/resolveAnnotations/parameters/double.kt @@ -7,6 +7,6 @@ annotation class Ann( val b4: Double ) -Ann(1.0, 1.toDouble(), 1.7976931348623157E309.toDouble(), 1.7976931348623157E309) class MyClass +@Ann(1.0, 1.toDouble(), 1.7976931348623157E309.toDouble(), 1.7976931348623157E309) class MyClass // EXPECTED: Ann(b1 = 1.0.toDouble(), b2 = 1.0.toDouble(), b3 = Infinity.toDouble(), b4 = Infinity.toDouble()) \ No newline at end of file diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/andAnd.kt b/compiler/testData/resolveAnnotations/parameters/expressions/andAnd.kt index 113d913bdfb..2279cf52f38 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/andAnd.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/andAnd.kt @@ -5,6 +5,6 @@ annotation class Ann( val b2: Boolean ) -Ann(true && false, true && true) class MyClass +@Ann(true && false, true && true) class MyClass // EXPECTED: Ann(b1 = false, b2 = true) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/boolean.kt b/compiler/testData/resolveAnnotations/parameters/expressions/boolean.kt index 2a681219867..7b05710b298 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/boolean.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/boolean.kt @@ -6,6 +6,6 @@ annotation class Ann( val b3: Boolean ) -Ann(true and false, false or true, true xor false) class MyClass +@Ann(true and false, false or true, true xor false) class MyClass // EXPECTED: Ann(b1 = false, b2 = true, b3 = true) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/char.kt b/compiler/testData/resolveAnnotations/parameters/expressions/char.kt index 004b0288ea9..005fa078e49 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/char.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/char.kt @@ -2,6 +2,6 @@ package test annotation class Ann(val c1: Char) -Ann('a' - 'a') class MyClass +@Ann('a' - 'a') class MyClass // EXPECTED: Ann(c1 = 0) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/compositeCallBinary.kt b/compiler/testData/resolveAnnotations/parameters/expressions/compositeCallBinary.kt index 71241670ca1..90c88ddcebf 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/compositeCallBinary.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/compositeCallBinary.kt @@ -6,6 +6,6 @@ annotation class Ann( val p3: Int ) -Ann(1.toInt().plus(1), 1.minus(1.toInt()), 1.toInt().times(1.toInt())) class MyClass +@Ann(1.toInt().plus(1), 1.minus(1.toInt()), 1.toInt().times(1.toInt())) class MyClass // EXPECTED: Ann(p1 = 2, p2 = 0, p3 = 1) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/divide.kt b/compiler/testData/resolveAnnotations/parameters/expressions/divide.kt index f5e60dd97e1..a84725be8a0 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/divide.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/divide.kt @@ -7,6 +7,6 @@ annotation class Ann( val l: Long ) -Ann(1 / 1, 1 / 1, 1 / 1, 1 / 1) class MyClass +@Ann(1 / 1, 1 / 1, 1 / 1, 1 / 1) class MyClass // EXPECTED: Ann(b = 1.toByte(), i = 1, l = 1.toLong(), s = 1.toShort()) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/double.kt b/compiler/testData/resolveAnnotations/parameters/expressions/double.kt index ef343b56f63..509a37fc2bb 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/double.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/double.kt @@ -6,6 +6,6 @@ annotation class Ann( val d3: Double ) -Ann(1.0 + 1.0, 1.0 + 1, 1 + 1.0) class MyClass +@Ann(1.0 + 1.0, 1.0 + 1, 1 + 1.0) class MyClass // EXPECTED: Ann(d1 = 2.0.toDouble(), d2 = 2.0.toDouble(), d3 = 2.0.toDouble()) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/eqeq.kt b/compiler/testData/resolveAnnotations/parameters/expressions/eqeq.kt index 8c9fa5e889a..405d3f8c0e9 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/eqeq.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/eqeq.kt @@ -8,6 +8,6 @@ annotation class Ann( val b5: Boolean ) -Ann(1 == 2, 1.0 == 2.0, 'b' == 'a', "a" == "b", "a" == "a") class MyClass +@Ann(1 == 2, 1.0 == 2.0, 'b' == 'a', "a" == "b", "a" == "a") class MyClass // EXPECTED: Ann(b1 = false, b2 = false, b3 = false, b4 = false, b5 = true) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/escapedString.kt b/compiler/testData/resolveAnnotations/parameters/expressions/escapedString.kt index 8b332a768bb..4353d444c6f 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/escapedString.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/escapedString.kt @@ -2,6 +2,6 @@ package test annotation class Ann(val s1: String) -Ann(s1 = "\$ab") class MyClass +@Ann(s1 = "\$ab") class MyClass // EXPECTED: Ann(s1 = "$ab") diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/float.kt b/compiler/testData/resolveAnnotations/parameters/expressions/float.kt index 576b9bcd274..48db4b40b7f 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/float.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/float.kt @@ -7,6 +7,6 @@ annotation class Ann( val d3: Double ) -Ann(1.toFloat() + 1.toFloat(), 1.toFloat() + 1, 1.toFloat() + 1.0) class MyClass +@Ann(1.toFloat() + 1.toFloat(), 1.toFloat() + 1, 1.toFloat() + 1.0) class MyClass // EXPECTED: Ann(d1 = 2.0.toFloat(), d2 = 2.0.toFloat(), d3 = 2.0.toDouble()) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/gt.kt b/compiler/testData/resolveAnnotations/parameters/expressions/gt.kt index 444f703b94d..c176ea468aa 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/gt.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/gt.kt @@ -12,6 +12,6 @@ annotation class Ann( val a = 1 val b = 2 -Ann(1 > 2, 1.0 > 2.0, 2 > a, b > a, 'b' > 'a', "a" > "b") class MyClass +@Ann(1 > 2, 1.0 > 2.0, 2 > a, b > a, 'b' > 'a', "a" > "b") class MyClass // EXPECTED: Ann(b1 = false, b2 = false, b3 = true, b4 = true, b5 = true, b6 = false) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/gteq.kt b/compiler/testData/resolveAnnotations/parameters/expressions/gteq.kt index 3bafaa791d6..4177c4d4845 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/gteq.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/gteq.kt @@ -7,6 +7,6 @@ annotation class Ann( val b4: Boolean ) -Ann(1 >= 2, 1.0 >= 2.0, 1 >= 1, 1.0 >= 1.0) class MyClass +@Ann(1 >= 2, 1.0 >= 2.0, 1 >= 1, 1.0 >= 1.0) class MyClass // EXPECTED: Ann(b1 = false, b2 = false, b3 = true, b4 = true) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/infixCallBinary.kt b/compiler/testData/resolveAnnotations/parameters/expressions/infixCallBinary.kt index 0d67ae790da..1036cebb1b1 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/infixCallBinary.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/infixCallBinary.kt @@ -8,6 +8,6 @@ annotation class Ann( val p5: Int ) -Ann(1 plus 1, 1 minus 1, 1 times 1, 1 div 1, 1 mod 1) class MyClass +@Ann(1 plus 1, 1 minus 1, 1 times 1, 1 div 1, 1 mod 1) class MyClass // EXPECTED: Ann(p1 = 2, p2 = 0, p3 = 1, p4 = 1, p5 = 0) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/intrincics.kt b/compiler/testData/resolveAnnotations/parameters/expressions/intrincics.kt index eac70c9d80f..e6dc49e9a20 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/intrincics.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/intrincics.kt @@ -8,6 +8,6 @@ annotation class Ann(p1: Int, p6: Int ) -Ann(1 or 1, 1 and 1, 1 xor 1, 1 shl 1, 1 shr 1, 1 ushr 1) class MyClass +@Ann(1 or 1, 1 and 1, 1 xor 1, 1 shl 1, 1 shr 1, 1 ushr 1) class MyClass // EXPECTED: Ann(p1 = 1, p2 = 1.toShort(), p3 = 0.toByte(), p4 = 2, p5 = 0, p6 = 0) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/labeled.kt b/compiler/testData/resolveAnnotations/parameters/expressions/labeled.kt index 9a235bffaa2..7928f6188e9 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/labeled.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/labeled.kt @@ -2,6 +2,6 @@ package test annotation class Ann(i: Double) -Ann(A@ 1.0) class MyClass +@Ann(A@ 1.0) class MyClass // EXPECTED: Ann(i = 1.0.toDouble()) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/long.kt b/compiler/testData/resolveAnnotations/parameters/expressions/long.kt index 1363d922c3a..51d84322b37 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/long.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/long.kt @@ -6,6 +6,6 @@ annotation class Ann( val l3: Long ) -Ann(1 + 1, java.lang.Long.MAX_VALUE + 1 - 1, java.lang.Long.MAX_VALUE - 1) class MyClass +@Ann(1 + 1, java.lang.Long.MAX_VALUE + 1 - 1, java.lang.Long.MAX_VALUE - 1) class MyClass // EXPECTED: Ann(l1 = 2.toLong(), l2 = 9223372036854775807.toLong(), l3 = 9223372036854775806.toLong()) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/lt.kt b/compiler/testData/resolveAnnotations/parameters/expressions/lt.kt index 94e6545804b..0b166d7c4df 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/lt.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/lt.kt @@ -12,6 +12,6 @@ annotation class Ann( val a = 1 val b = 2 -Ann(1 < 2, 1.0 < 2.0, 2 < a, b < a, 'b' < 'a', "a" < "b") class MyClass +@Ann(1 < 2, 1.0 < 2.0, 2 < a, b < a, 'b' < 'a', "a" < "b") class MyClass // EXPECTED: Ann(b1 = true, b2 = true, b3 = false, b4 = false, b5 = false, b6 = true) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/lteq.kt b/compiler/testData/resolveAnnotations/parameters/expressions/lteq.kt index efb695c94aa..79b712cc71a 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/lteq.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/lteq.kt @@ -7,6 +7,6 @@ annotation class Ann( val b4: Boolean ) -Ann(1 <= 2, 1.0 <= 2.0, 1 <= 1, 1.0 <= 1.0) class MyClass +@Ann(1 <= 2, 1.0 <= 2.0, 1 <= 1, 1.0 <= 1.0) class MyClass // EXPECTED: Ann(b1 = true, b2 = true, b3 = true, b4 = true) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/maxValue.kt b/compiler/testData/resolveAnnotations/parameters/expressions/maxValue.kt index b6f9bab71d4..386f29544d4 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/maxValue.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/maxValue.kt @@ -9,7 +9,7 @@ annotation class Ann( val p6: Long ) -Ann( +@Ann( p1 = java.lang.Byte.MAX_VALUE + 1, p2 = java.lang.Short.MAX_VALUE + 1, p3 = java.lang.Integer.MAX_VALUE + 1, diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/maxValueByte.kt b/compiler/testData/resolveAnnotations/parameters/expressions/maxValueByte.kt index 9127af4c873..e179923eac9 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/maxValueByte.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/maxValueByte.kt @@ -8,7 +8,7 @@ annotation class Ann( val p5: Byte ) -Ann( +@Ann( p1 = java.lang.Byte.MAX_VALUE + 1, p2 = 1 + 1, p3 = java.lang.Byte.MAX_VALUE + 1, diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/maxValueInt.kt b/compiler/testData/resolveAnnotations/parameters/expressions/maxValueInt.kt index ad28cc95479..ad240b1dc97 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/maxValueInt.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/maxValueInt.kt @@ -8,7 +8,7 @@ annotation class Ann( val p5: Int ) -Ann( +@Ann( p1 = java.lang.Integer.MAX_VALUE + 1, p2 = 1 + 1, p3 = java.lang.Integer.MAX_VALUE + 1, diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/miltiply.kt b/compiler/testData/resolveAnnotations/parameters/expressions/miltiply.kt index 6974a5e5986..0d19ec54bff 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/miltiply.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/miltiply.kt @@ -7,6 +7,6 @@ annotation class Ann( val l: Long ) -Ann(1 * 1, 1 * 1, 1 * 1, 1 * 1) class MyClass +@Ann(1 * 1, 1 * 1, 1 * 1, 1 * 1) class MyClass // EXPECTED: Ann(b = 1.toByte(), i = 1, l = 1.toLong(), s = 1.toShort()) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/minus.kt b/compiler/testData/resolveAnnotations/parameters/expressions/minus.kt index f3e7cb53f57..70929664597 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/minus.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/minus.kt @@ -7,6 +7,6 @@ annotation class Ann( val l: Long ) -Ann(1 - 1, 1 - 1, 1 - 1, 1 - 1) class MyClass +@Ann(1 - 1, 1 - 1, 1 - 1, 1 - 1) class MyClass // EXPECTED: Ann(b = 0.toByte(), i = 0, l = 0.toLong(), s = 0.toShort()) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/mod.kt b/compiler/testData/resolveAnnotations/parameters/expressions/mod.kt index 0754ffe3dc1..6c954347735 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/mod.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/mod.kt @@ -7,6 +7,6 @@ annotation class Ann( val l: Long ) -Ann(1 % 1, 1 % 1, 1 % 1, 1 % 1) class MyClass +@Ann(1 % 1, 1 % 1, 1 % 1, 1 % 1) class MyClass // EXPECTED: Ann(b = 0.toByte(), i = 0, l = 0.toLong(), s = 0.toShort()) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/multilineString.kt b/compiler/testData/resolveAnnotations/parameters/expressions/multilineString.kt index 5dc162bea55..190875afa34 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/multilineString.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/multilineString.kt @@ -2,6 +2,6 @@ package test annotation class Ann(val s1: String) -Ann(s1 = """a""" + "b") class MyClass +@Ann(s1 = """a""" + "b") class MyClass // EXPECTED: Ann(s1 = "ab") diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/not.kt b/compiler/testData/resolveAnnotations/parameters/expressions/not.kt index 75db7334753..4415d6f7b63 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/not.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/not.kt @@ -6,6 +6,6 @@ annotation class Ann( val b3: Boolean ) -Ann(!true, !false) class MyClass +@Ann(!true, !false) class MyClass // EXPECTED: Ann(b1 = false, b2 = true) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/noteq.kt b/compiler/testData/resolveAnnotations/parameters/expressions/noteq.kt index 052ef54668c..0130b75f9e7 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/noteq.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/noteq.kt @@ -8,6 +8,6 @@ annotation class Ann( val b5: Boolean ) -Ann(1 != 2, 1.0 != 2.0, 'b' != 'a', "a" != "b", "a" != "a") class MyClass +@Ann(1 != 2, 1.0 != 2.0, 'b' != 'a', "a" != "b", "a" != "a") class MyClass // EXPECTED: Ann(b1 = true, b2 = true, b3 = true, b4 = true, b5 = false) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/orOr.kt b/compiler/testData/resolveAnnotations/parameters/expressions/orOr.kt index 3e4511d4f5e..f972007d9e6 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/orOr.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/orOr.kt @@ -5,6 +5,6 @@ annotation class Ann( val b2: Boolean ) -Ann(true || false, true || true) class MyClass +@Ann(true || false, true || true) class MyClass // EXPECTED: Ann(b1 = true, b2 = true) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/paranthesized.kt b/compiler/testData/resolveAnnotations/parameters/expressions/paranthesized.kt index 42bd629f2db..9c2cb360909 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/paranthesized.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/paranthesized.kt @@ -2,6 +2,6 @@ package test annotation class Ann(i: Int) -Ann((1 + 2) * 2) class MyClass +@Ann((1 + 2) * 2) class MyClass // EXPECTED: Ann(i = 6) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/plus.kt b/compiler/testData/resolveAnnotations/parameters/expressions/plus.kt index 36d84f9b39d..cfa39c992d8 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/plus.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/plus.kt @@ -7,6 +7,6 @@ annotation class Ann( val l: Long ) -Ann(1 + 1, 1 + 1, 1 + 1, 1 + 1) class MyClass +@Ann(1 + 1, 1 + 1, 1 + 1, 1 + 1) class MyClass // EXPECTED: Ann(b = 2.toByte(), i = 2, l = 2.toLong(), s = 2.toShort()) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/simpleCallBinary.kt b/compiler/testData/resolveAnnotations/parameters/expressions/simpleCallBinary.kt index 5e474748142..0d05d2f9591 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/simpleCallBinary.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/simpleCallBinary.kt @@ -8,6 +8,6 @@ annotation class Ann( val p5: Int ) -Ann(1.plus(1), 1.minus(1), 1.times(1), 1.div(1), 1.mod(1)) class MyClass +@Ann(1.plus(1), 1.minus(1), 1.times(1), 1.div(1), 1.mod(1)) class MyClass // EXPECTED: Ann(p1 = 2, p2 = 0, p3 = 1, p4 = 1, p5 = 0) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/stringPlusInt.kt b/compiler/testData/resolveAnnotations/parameters/expressions/stringPlusInt.kt index f5ce5517e2d..a14dace2b20 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/stringPlusInt.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/stringPlusInt.kt @@ -2,6 +2,6 @@ package test annotation class Ann(val s1: String) -Ann(s1 = "a" + 1) class MyClass +@Ann(s1 = "a" + 1) class MyClass // EXPECTED: Ann(s1 = "a1") diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/stringTemplate.kt b/compiler/testData/resolveAnnotations/parameters/expressions/stringTemplate.kt index ad85192891d..8c44265dc8a 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/stringTemplate.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/stringTemplate.kt @@ -9,7 +9,7 @@ annotation class Ann( val i = 1 -Ann( +@Ann( s1 = "a$i", s2 = "a$i b", s3 = "$i", diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/strings.kt b/compiler/testData/resolveAnnotations/parameters/expressions/strings.kt index 83200cbf300..d2bda68951f 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/strings.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/strings.kt @@ -4,6 +4,6 @@ annotation class Ann(val s1: String, val s2: String) val i = 1 -Ann(s1 = "a" + "b", s2 = "a" + "a$i") class MyClass +@Ann(s1 = "a" + "b", s2 = "a" + "a$i") class MyClass // EXPECTED: Ann(s1 = "ab", s2 = "aa1") diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/unaryMinus.kt b/compiler/testData/resolveAnnotations/parameters/expressions/unaryMinus.kt index f7f7c911aac..d2233050804 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/unaryMinus.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/unaryMinus.kt @@ -9,6 +9,6 @@ annotation class Ann( val b6: Float ) -Ann(-1, -1, -1, -1, -1.0, -1.0.toFloat()) class MyClass +@Ann(-1, -1, -1, -1, -1.0, -1.0.toFloat()) class MyClass // EXPECTED: Ann(b1 = -1.toByte(), b2 = -1.toShort(), b3 = -1, b4 = -1.toLong(), b5 = -1.0.toDouble(), b6 = -1.0.toFloat()) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/unaryPlus.kt b/compiler/testData/resolveAnnotations/parameters/expressions/unaryPlus.kt index 8d9a91b50af..32d21e489e7 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/unaryPlus.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/unaryPlus.kt @@ -9,6 +9,6 @@ annotation class Ann( val b6: Float ) -Ann(+1, +1, +1, +1, +1.0, +1.0.toFloat()) class MyClass +@Ann(+1, +1, +1, +1, +1.0, +1.0.toFloat()) class MyClass // EXPECTED: Ann(b1 = 1.toByte(), b2 = 1.toShort(), b3 = 1, b4 = 1.toLong(), b5 = 1.0.toDouble(), b6 = 1.0.toFloat()) diff --git a/compiler/testData/resolveAnnotations/parameters/float.kt b/compiler/testData/resolveAnnotations/parameters/float.kt index 2ad0d5cb885..2c33cf9b2ea 100644 --- a/compiler/testData/resolveAnnotations/parameters/float.kt +++ b/compiler/testData/resolveAnnotations/parameters/float.kt @@ -5,6 +5,6 @@ annotation class Ann( val b2: Float ) -Ann(1.toFloat(), 1.0.toFloat()) class MyClass +@Ann(1.toFloat(), 1.0.toFloat()) class MyClass // EXPECTED: Ann(b1 = 1.0.toFloat(), b2 = 1.0.toFloat()) \ No newline at end of file diff --git a/compiler/testData/resolveAnnotations/parameters/int.kt b/compiler/testData/resolveAnnotations/parameters/int.kt index f02f77b3c02..e509e809476 100644 --- a/compiler/testData/resolveAnnotations/parameters/int.kt +++ b/compiler/testData/resolveAnnotations/parameters/int.kt @@ -7,6 +7,6 @@ annotation class Ann( val b4: Int ) -Ann(1, 1.toInt(), 2147483648.toInt(), 2147483648) class MyClass +@Ann(1, 1.toInt(), 2147483648.toInt(), 2147483648) class MyClass // EXPECTED: Ann(b1 = 1, b2 = 1, b3 = -2147483648, b4 = 2147483648.toLong()) \ No newline at end of file diff --git a/compiler/testData/resolveAnnotations/parameters/long.kt b/compiler/testData/resolveAnnotations/parameters/long.kt index 06c689d50ef..152624f69de 100644 --- a/compiler/testData/resolveAnnotations/parameters/long.kt +++ b/compiler/testData/resolveAnnotations/parameters/long.kt @@ -5,6 +5,6 @@ annotation class Ann( val b2: Long ) -Ann(1, 1.toLong()) class MyClass +@Ann(1, 1.toLong()) class MyClass // EXPECTED: Ann(b1 = 1.toLong(), b2 = 1.toLong()) \ No newline at end of file diff --git a/compiler/testData/resolveAnnotations/parameters/short.kt b/compiler/testData/resolveAnnotations/parameters/short.kt index 9192a5bbcb2..b8bf373c922 100644 --- a/compiler/testData/resolveAnnotations/parameters/short.kt +++ b/compiler/testData/resolveAnnotations/parameters/short.kt @@ -7,6 +7,6 @@ annotation class Ann( val b4: Short ) -Ann(1, 1.toShort(), 32768.toShort(), 32768) class MyClass +@Ann(1, 1.toShort(), 32768.toShort(), 32768) class MyClass // EXPECTED: Ann(b1 = 1.toShort(), b2 = 1.toShort(), b3 = -32768.toShort(), b4 = 32768) \ No newline at end of file diff --git a/compiler/testData/resolveAnnotations/testFile.kt b/compiler/testData/resolveAnnotations/testFile.kt index 4175418b6f2..24f31927ccd 100644 --- a/compiler/testData/resolveAnnotations/testFile.kt +++ b/compiler/testData/resolveAnnotations/testFile.kt @@ -5,14 +5,14 @@ package test import test.MyEnum.* import kotlin.reflect.KClass -ANNOTATION class MyClass @ANNOTATION constructor(@ANNOTATION param: Int, @ANNOTATION val consProp: Int) { - ANNOTATION companion object { +@ANNOTATION class MyClass @ANNOTATION constructor(@ANNOTATION param: Int, @ANNOTATION val consProp: Int) { + @ANNOTATION companion object { } - ANNOTATION var prop: Int = 1 + @ANNOTATION var prop: Int = 1 @ANNOTATION get @ANNOTATION set(@ANNOTATION param) = $prop = param - ANNOTATION fun foo(@ANNOTATION param: Int) { + @ANNOTATION fun foo(@ANNOTATION param: Int) { @ANNOTATION class LocalClass { } @ANNOTATION object LocalObject { } @@ -22,19 +22,19 @@ ANNOTATION class MyClass @ANNOTATION constructor(@ANNOTATION param: Int, @ANNOTA @ANNOTATION var localVar: Int = 1 } - ANNOTATION class InnerClass { + @ANNOTATION class InnerClass { } } -ANNOTATION object MyObject { +@ANNOTATION object MyObject { } -ANNOTATION var topProp: Int = 1 +@ANNOTATION var topProp: Int = 1 @ANNOTATION get @ANNOTATION set(@ANNOTATION param) = $topProp = param -ANNOTATION fun topFoo(@ANNOTATION param: Int) { +@ANNOTATION fun topFoo(@ANNOTATION param: Int) { } val funLiteral = {(@ANNOTATION a: Int) -> a } diff --git a/compiler/testData/resolvedCalls/differentCallElements/annotationCall.kt b/compiler/testData/resolvedCalls/differentCallElements/annotationCall.kt index 8797a965f46..1089f5dd84b 100644 --- a/compiler/testData/resolvedCalls/differentCallElements/annotationCall.kt +++ b/compiler/testData/resolvedCalls/differentCallElements/annotationCall.kt @@ -1,3 +1,3 @@ annotation class MyA(val i: Int) -MyA(1) fun foo() {} \ No newline at end of file +@MyA(1) fun foo() {} \ No newline at end of file diff --git a/compiler/testData/resolvedCalls/differentCallElements/annotationCall.txt b/compiler/testData/resolvedCalls/differentCallElements/annotationCall.txt index 3cb1219c03d..21938df818a 100644 --- a/compiler/testData/resolvedCalls/differentCallElements/annotationCall.txt +++ b/compiler/testData/resolvedCalls/differentCallElements/annotationCall.txt @@ -1,6 +1,6 @@ annotation class MyA(val i: Int) -MyA(1) fun foo() {} +@MyA(1) fun foo() {} Resolved call: diff --git a/compiler/testData/serialization/builtinsSerializer/annotationArguments/annotation.kt b/compiler/testData/serialization/builtinsSerializer/annotationArguments/annotation.kt index 052a4c82d38..8f489f853be 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationArguments/annotation.kt +++ b/compiler/testData/serialization/builtinsSerializer/annotationArguments/annotation.kt @@ -6,9 +6,9 @@ annotation class JustAnnotation(val annotation: Empty) annotation class AnnotationArray(val annotationArray: Array) -JustAnnotation(Empty()) -AnnotationArray(array()) +@JustAnnotation(Empty()) +@AnnotationArray(array()) class C1 -AnnotationArray(array(JustAnnotation(Empty()), JustAnnotation(Empty()))) +@AnnotationArray(array(JustAnnotation(Empty()), JustAnnotation(Empty()))) class C2 diff --git a/compiler/testData/serialization/builtinsSerializer/annotationArguments/enum.kt b/compiler/testData/serialization/builtinsSerializer/annotationArguments/enum.kt index e51ea330fd9..4c8d81e754d 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationArguments/enum.kt +++ b/compiler/testData/serialization/builtinsSerializer/annotationArguments/enum.kt @@ -10,9 +10,9 @@ annotation class JustEnum(val weapon: Weapon) annotation class EnumArray(val enumArray: Array) -JustEnum(Weapon.SCISSORS) -EnumArray(array()) +@JustEnum(Weapon.SCISSORS) +@EnumArray(array()) class C1 -EnumArray(array(Weapon.PAPER, Weapon.ROCK)) +@EnumArray(array(Weapon.PAPER, Weapon.ROCK)) class C2 diff --git a/compiler/testData/serialization/builtinsSerializer/annotationArguments/primitiveArrays.kt b/compiler/testData/serialization/builtinsSerializer/annotationArguments/primitiveArrays.kt index d2381182aa1..930842f82be 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationArguments/primitiveArrays.kt +++ b/compiler/testData/serialization/builtinsSerializer/annotationArguments/primitiveArrays.kt @@ -11,7 +11,7 @@ annotation class PrimitiveArrays( val booleanArray: BooleanArray ) -PrimitiveArrays( +@PrimitiveArrays( byteArray = byteArray(-7, 7), charArray = charArray('%', 'z'), shortArray = shortArray(239), @@ -23,7 +23,7 @@ PrimitiveArrays( ) class C1 -PrimitiveArrays( +@PrimitiveArrays( byteArray = byteArray(), charArray = charArray(), shortArray = shortArray(), diff --git a/compiler/testData/serialization/builtinsSerializer/annotationArguments/primitives.kt b/compiler/testData/serialization/builtinsSerializer/annotationArguments/primitives.kt index bafa335e6ed..06bb337a103 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationArguments/primitives.kt +++ b/compiler/testData/serialization/builtinsSerializer/annotationArguments/primitives.kt @@ -11,7 +11,7 @@ annotation class Primitives( val boolean: Boolean ) -Primitives( +@Primitives( byte = 7, char = '%', short = 239, @@ -23,7 +23,7 @@ Primitives( ) class C -Primitives( +@Primitives( byte = 7: Byte, char = '%': Char, short = 239: Short, diff --git a/compiler/testData/serialization/builtinsSerializer/annotationArguments/string.kt b/compiler/testData/serialization/builtinsSerializer/annotationArguments/string.kt index 68ad6a1ab51..435cda93509 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationArguments/string.kt +++ b/compiler/testData/serialization/builtinsSerializer/annotationArguments/string.kt @@ -4,9 +4,9 @@ annotation class JustString(val string: String) annotation class StringArray(val stringArray: Array) -JustString("kotlin") -StringArray(array()) +@JustString("kotlin") +@StringArray(array()) class C1 -StringArray(array("java", "")) +@StringArray(array("java", "")) class C2 diff --git a/compiler/testData/serialization/builtinsSerializer/annotationArguments/varargs.kt b/compiler/testData/serialization/builtinsSerializer/annotationArguments/varargs.kt index 75c4a651010..726828d9a88 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationArguments/varargs.kt +++ b/compiler/testData/serialization/builtinsSerializer/annotationArguments/varargs.kt @@ -4,4 +4,4 @@ enum class My { ALPHA, BETA, OMEGA } annotation class ann(vararg val m: My) -ann(My.ALPHA, My.BETA) annotation class annotated +@ann(My.ALPHA, My.BETA) annotation class annotated diff --git a/compiler/testData/serialization/builtinsSerializer/annotationTargets.kt b/compiler/testData/serialization/builtinsSerializer/annotationTargets.kt index b8fc0759edc..873107bd1b3 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationTargets.kt +++ b/compiler/testData/serialization/builtinsSerializer/annotationTargets.kt @@ -3,35 +3,35 @@ package test annotation class anno(val x: String) -anno("top level function") -fun f1(anno("top level function parameter") p: Int) {} +@anno("top level function") +fun f1(@anno("top level function parameter") p: Int) {} -anno("top level property") +@anno("top level property") val p1 = null -anno("extension function") -fun Long.f2(anno("extension function parameter") p: Int) {} +@anno("extension function") +fun Long.f2(@anno("extension function parameter") p: Int) {} -anno("extension property") +@anno("extension property") val Double.p2: Double get() = null -anno("top level class") +@anno("top level class") class C1 @anno("constructor") constructor() { - anno("member function") - fun f3(anno("member function parameter") p: Int) {} + @anno("member function") + fun f3(@anno("member function parameter") p: Int) {} - anno("member property") + @anno("member property") val p3 = null - anno("member extension function") + @anno("member extension function") fun String.f4() {} - anno("member extension property") + @anno("member extension property") val Int.v4: Int get() = this - anno("nested class") + @anno("nested class") class C2 - anno("companion object") + @anno("companion object") companion object {} } diff --git a/compiler/testData/serialization/local/annotationsInLocalClass.kt b/compiler/testData/serialization/local/annotationsInLocalClass.kt index 3830b982ad4..41d03a859b3 100644 --- a/compiler/testData/serialization/local/annotationsInLocalClass.kt +++ b/compiler/testData/serialization/local/annotationsInLocalClass.kt @@ -5,10 +5,10 @@ class A { fun foo() { @Ann("class") class Local { - Ann("fun") fun foo(): Local = this + @Ann("fun") fun foo(): Local = this @field:Ann("val") val x = foo() - Ann("inner") inner class Inner + @Ann("inner") inner class Inner } } } diff --git a/compiler/testData/writeFlags/class/deprecatedFlag/class.kt b/compiler/testData/writeFlags/class/deprecatedFlag/class.kt index 6a9489aab70..cee07a66de0 100644 --- a/compiler/testData/writeFlags/class/deprecatedFlag/class.kt +++ b/compiler/testData/writeFlags/class/deprecatedFlag/class.kt @@ -1,4 +1,4 @@ -Deprecated("") class MyClass() { +@Deprecated("") class MyClass() { } // TESTED_OBJECT_KIND: class diff --git a/compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt b/compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt index e4f9c178aac..0e98cb09b42 100644 --- a/compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt +++ b/compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt @@ -1,5 +1,5 @@ class MyClass { - Deprecated("") companion object { + @Deprecated("") companion object { } } diff --git a/compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt b/compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt index 93346e128d7..e8308c34df7 100644 --- a/compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt +++ b/compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt @@ -1,4 +1,4 @@ -Deprecated("") enum class MyEnum { +@Deprecated("") enum class MyEnum { FIRST } diff --git a/compiler/testData/writeFlags/class/deprecatedFlag/innerClass.kt b/compiler/testData/writeFlags/class/deprecatedFlag/innerClass.kt index b0fb03e3b02..31f051f3ed2 100644 --- a/compiler/testData/writeFlags/class/deprecatedFlag/innerClass.kt +++ b/compiler/testData/writeFlags/class/deprecatedFlag/innerClass.kt @@ -1,5 +1,5 @@ class MyClass() { - Deprecated("") public class MyInnerClass() {} + @Deprecated("") public class MyInnerClass() {} } // TESTED_OBJECT_KIND: class diff --git a/compiler/testData/writeFlags/class/deprecatedFlag/trait.kt b/compiler/testData/writeFlags/class/deprecatedFlag/trait.kt index a16619679ec..1597987c24b 100644 --- a/compiler/testData/writeFlags/class/deprecatedFlag/trait.kt +++ b/compiler/testData/writeFlags/class/deprecatedFlag/trait.kt @@ -1,4 +1,4 @@ -Deprecated("") public interface MyTrait { +@Deprecated("") public interface MyTrait { } // TESTED_OBJECT_KIND: class diff --git a/compiler/testData/writeFlags/function/deprecatedFlag/extentionFun.kt b/compiler/testData/writeFlags/function/deprecatedFlag/extentionFun.kt index e79955434f9..c45b31bfa36 100644 --- a/compiler/testData/writeFlags/function/deprecatedFlag/extentionFun.kt +++ b/compiler/testData/writeFlags/function/deprecatedFlag/extentionFun.kt @@ -1,6 +1,6 @@ class MyClass() { } -Deprecated("") fun MyClass.test() {} +@Deprecated("") fun MyClass.test() {} // TESTED_OBJECT_KIND: function // TESTED_OBJECTS: _DefaultPackage, test diff --git a/compiler/testData/writeFlags/function/deprecatedFlag/funInClass.kt b/compiler/testData/writeFlags/function/deprecatedFlag/funInClass.kt index 770463b5d54..39632e352e5 100644 --- a/compiler/testData/writeFlags/function/deprecatedFlag/funInClass.kt +++ b/compiler/testData/writeFlags/function/deprecatedFlag/funInClass.kt @@ -1,5 +1,5 @@ class MyClass() { - Deprecated("") fun test() {} + @Deprecated("") fun test() {} } // TESTED_OBJECT_KIND: function diff --git a/compiler/testData/writeFlags/function/deprecatedFlag/funInClassObject.kt b/compiler/testData/writeFlags/function/deprecatedFlag/funInClassObject.kt index 1f37a6930bb..02c5a03e5ab 100644 --- a/compiler/testData/writeFlags/function/deprecatedFlag/funInClassObject.kt +++ b/compiler/testData/writeFlags/function/deprecatedFlag/funInClassObject.kt @@ -1,6 +1,6 @@ class MyClass() { companion object { - Deprecated("") fun test() {} + @Deprecated("") fun test() {} } } diff --git a/compiler/testData/writeFlags/function/deprecatedFlag/getterAnnotationOnProperty.kt b/compiler/testData/writeFlags/function/deprecatedFlag/getterAnnotationOnProperty.kt index 5f62f8a5346..dd121d16303 100644 --- a/compiler/testData/writeFlags/function/deprecatedFlag/getterAnnotationOnProperty.kt +++ b/compiler/testData/writeFlags/function/deprecatedFlag/getterAnnotationOnProperty.kt @@ -1,5 +1,5 @@ class MyClass() { - Deprecated("") val test = "" + @Deprecated("") val test = "" } diff --git a/compiler/testData/writeFlags/function/deprecatedFlag/setterAnnotationOnProperty.kt b/compiler/testData/writeFlags/function/deprecatedFlag/setterAnnotationOnProperty.kt index 3a7cee7e545..f581aa17ed9 100644 --- a/compiler/testData/writeFlags/function/deprecatedFlag/setterAnnotationOnProperty.kt +++ b/compiler/testData/writeFlags/function/deprecatedFlag/setterAnnotationOnProperty.kt @@ -1,5 +1,5 @@ class MyClass() { - Deprecated("") var test = "" + @Deprecated("") var test = "" } diff --git a/compiler/testData/writeFlags/function/deprecatedFlag/topLevelFun.kt b/compiler/testData/writeFlags/function/deprecatedFlag/topLevelFun.kt index 559af0002c2..aeb8e5ed5de 100644 --- a/compiler/testData/writeFlags/function/deprecatedFlag/topLevelFun.kt +++ b/compiler/testData/writeFlags/function/deprecatedFlag/topLevelFun.kt @@ -1,4 +1,4 @@ -Deprecated("") fun test() {} +@Deprecated("") fun test() {} // TESTED_OBJECT_KIND: function // TESTED_OBJECTS: _DefaultPackage, test diff --git a/compiler/testData/writeFlags/property/deprecatedFlag/propertyInClass.kt b/compiler/testData/writeFlags/property/deprecatedFlag/propertyInClass.kt index 8897296d1f5..6dfe3e5d207 100644 --- a/compiler/testData/writeFlags/property/deprecatedFlag/propertyInClass.kt +++ b/compiler/testData/writeFlags/property/deprecatedFlag/propertyInClass.kt @@ -1,5 +1,5 @@ class MyClass() { - Deprecated("") public val test: Int = 0 + @Deprecated("") public val test: Int = 0 } diff --git a/compiler/testData/writeFlags/property/deprecatedFlag/topLevelProperty.kt b/compiler/testData/writeFlags/property/deprecatedFlag/topLevelProperty.kt index 46a5fcffa5d..b0c4054bfee 100644 --- a/compiler/testData/writeFlags/property/deprecatedFlag/topLevelProperty.kt +++ b/compiler/testData/writeFlags/property/deprecatedFlag/topLevelProperty.kt @@ -1,4 +1,4 @@ -Deprecated("") val test: Int = 0 +@Deprecated("") val test: Int = 0 // TESTED_OBJECT_KIND: property // TESTED_OBJECTS: TopLevelPropertyKt, test diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/AnnotationGenTest.java b/compiler/tests/org/jetbrains/kotlin/codegen/AnnotationGenTest.java index 61a649edd9a..b69cf3ac634 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/AnnotationGenTest.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/AnnotationGenTest.java @@ -47,7 +47,7 @@ public class AnnotationGenTest extends CodegenTestCase { } public void testVolatileProperty() throws Exception { - loadText("abstract class Foo { public volatile var x: String = \"\"; }"); + loadText("abstract class Foo { @Volatile public var x: String = \"\"; }"); Class aClass = generateClass("Foo"); Field x = aClass.getDeclaredField("x"); assertTrue((x.getModifiers() & Modifier.VOLATILE) != 0); @@ -167,7 +167,7 @@ public class AnnotationGenTest extends CodegenTestCase { public void testAnnotationWithParamForParamInFunction() throws Exception { ClassLoader loader = loadFileGetClassLoader("import java.lang.annotation.*\n" + "@java.lang.annotation.Retention(RetentionPolicy.RUNTIME) annotation class A(val a: String)\n" + - "fun x(A(\"239\") i: Int) {}"); + "fun x(@A(\"239\") i: Int) {}"); Class packageClass = getPackageSrcClass(loader); Method packageClassMethod = packageClass.getMethod("x", int.class); assertNotNull(packageClassMethod); @@ -248,7 +248,7 @@ public class AnnotationGenTest extends CodegenTestCase { "" + "@java.lang.annotation.Retention(RetentionPolicy.RUNTIME) annotation class A(val a: String)\n" + "" + - "A(\"239\") class B()"); + "@A(\"239\") class B()"); Class aClass = generateClass("A"); Retention annotation = (Retention)aClass.getAnnotation(Retention.class); @@ -282,7 +282,7 @@ public class AnnotationGenTest extends CodegenTestCase { "annotation class C(val c: String)\n" + "@java.lang.annotation.Retention(RetentionPolicy.RUNTIME) annotation class A(val a: C)\n" + "" + - "A(C(\"239\")) class B()"); + "@A(C(\"239\")) class B()"); Class aClass = generateClass("A"); Retention annotation = (Retention)aClass.getAnnotation(Retention.class); @@ -319,7 +319,7 @@ public class AnnotationGenTest extends CodegenTestCase { "" + "@java.lang.annotation.Retention(RetentionPolicy.RUNTIME) annotation class A(val a: Array)\n" + "" + - "A(array(\"239\",\"932\")) class B()"); + "@A(array(\"239\",\"932\")) class B()"); Class aClass = generateClass("A"); Retention annotation = (Retention)aClass.getAnnotation(Retention.class); @@ -354,7 +354,7 @@ public class AnnotationGenTest extends CodegenTestCase { "" + "@java.lang.annotation.Retention(RetentionPolicy.RUNTIME) annotation class A(val a: IntArray)\n" + "" + - "A(intArray(239,932)) class B()"); + "@A(intArray(239,932)) class B()"); Class aClass = generateClass("A"); Retention annotation = (Retention)aClass.getAnnotation(Retention.class); @@ -411,7 +411,7 @@ public class AnnotationGenTest extends CodegenTestCase { "" + "@Retention(RetentionPolicy.RUNTIME) annotation class A(val a: Array)\n" + "" + - "A(array(Retention(RetentionPolicy.RUNTIME),Retention(RetentionPolicy.SOURCE))) class B()"); + "@A(array(Retention(RetentionPolicy.RUNTIME),Retention(RetentionPolicy.SOURCE))) class B()"); Class aClass = generateClass("A"); Method[] methods = aClass.getDeclaredMethods(); diff --git a/idea/src/org/jetbrains/kotlin/idea/highlighter/KotlinColorSettingsPage.kt b/idea/src/org/jetbrains/kotlin/idea/highlighter/KotlinColorSettingsPage.kt index 7dacdb5ac6b..583bae691da 100644 --- a/idea/src/org/jetbrains/kotlin/idea/highlighter/KotlinColorSettingsPage.kt +++ b/idea/src/org/jetbrains/kotlin/idea/highlighter/KotlinColorSettingsPage.kt @@ -44,7 +44,7 @@ public class KotlinColorSettingsPage : ColorSettingsPage { * Doc comment here for `SomeClass` * @see Iterator#next() */ -@deprecated("Deprecated class") +@Deprecated("Deprecated class") public class MyClass<out T : Iterable<T>>(var prop1 : Int) fun foo(nullable : String?, r : Runnable, f : () -> Int, fl : FunctionLike, dyn: dynamic) { println("length\nis ${"$"}{nullable?.length} \e") diff --git a/idea/testData/checker/PlatformStaticUsagesRuntime.kt b/idea/testData/checker/PlatformStaticUsagesRuntime.kt index 9cd41782085..9fbc5889aff 100644 --- a/idea/testData/checker/PlatformStaticUsagesRuntime.kt +++ b/idea/testData/checker/PlatformStaticUsagesRuntime.kt @@ -1,8 +1,8 @@ import kotlin.jvm.JvmStatic -JvmStatic +@JvmStatic class A { - JvmStatic + @JvmStatic companion object { @JvmStatic fun a1() { @@ -29,7 +29,7 @@ class A { } } -JvmStatic +@JvmStatic interface B { companion object { @JvmStatic fun a1() { diff --git a/idea/testData/decompiler/decompiledText/Annotations/Annotations.kt b/idea/testData/decompiler/decompiledText/Annotations/Annotations.kt index c05f88f0e3b..8fb9d90824b 100644 --- a/idea/testData/decompiler/decompiledText/Annotations/Annotations.kt +++ b/idea/testData/decompiler/decompiledText/Annotations/Annotations.kt @@ -2,10 +2,10 @@ package test import dependency.* -data A("a") B(1) C class Annotations { +data @A("a") @B(1) @C class Annotations { - inline A("f") B(2) C fun f(A("i") B(3) C Deprecated("1") i: @A("int") Int) { + inline @A("f") @B(2) @C fun f(@A("i") @B(3) @C @Deprecated("1") i: @A("int") Int) { } - inline A("p") B(3) C val p: @B(4) Int = 2 + inline @A("p") @B(3) @C val p: @B(4) Int = 2 } diff --git a/idea/testData/decompiler/decompiledText/SecondaryConstructors/SecondaryConstructors.kt b/idea/testData/decompiler/decompiledText/SecondaryConstructors/SecondaryConstructors.kt index 7ee8627aeed..e3d0f241bac 100644 --- a/idea/testData/decompiler/decompiledText/SecondaryConstructors/SecondaryConstructors.kt +++ b/idea/testData/decompiler/decompiledText/SecondaryConstructors/SecondaryConstructors.kt @@ -4,7 +4,7 @@ class SecondaryConstructors(x: Boolean) { init { } - anno constructor(x: String) : this(x == "abc") { + @anno constructor(x: String) : this(x == "abc") { } init { @@ -19,7 +19,7 @@ class SecondaryConstructors(x: Boolean) { } class Nested { - anno constructor(z: Int) {} + @anno constructor(z: Int) {} internal constructor() {} } } diff --git a/idea/testData/decompiler/navigation/decompiled/MainKt.kt b/idea/testData/decompiler/navigation/decompiled/MainKt.kt index 0a74303ae94..fd8839e3489 100644 --- a/idea/testData/decompiler/navigation/decompiled/MainKt.kt +++ b/idea/testData/decompiler/navigation/decompiled/MainKt.kt @@ -33,4 +33,4 @@ package testData.libraries [public fun processDouble(d: testData.libraries.Double): kotlin.Unit { /* compiled code */ }] -[kotlin.inline public fun T.filter(predicate: (T) -> kotlin.Boolean): T? { /* compiled code */ }] \ No newline at end of file +[@kotlin.inline public fun T.filter(predicate: (T) -> kotlin.Boolean): T? { /* compiled code */ }] \ No newline at end of file diff --git a/idea/testData/decompiler/stubBuilder/Annotations/Annotations.kt b/idea/testData/decompiler/stubBuilder/Annotations/Annotations.kt index 5a3d55d0c47..14db8d4d6d1 100644 --- a/idea/testData/decompiler/stubBuilder/Annotations/Annotations.kt +++ b/idea/testData/decompiler/stubBuilder/Annotations/Annotations.kt @@ -1,13 +1,13 @@ -a public class Annotations private @a constructor(private @property:a @param:a val c1: Int, @property:a @param:a val c2: Int) { +@a public class Annotations private @a constructor(private @property:a @param:a val c1: Int, @property:a @param:a val c2: Int) { - protected a fun f() { + protected @a fun f() { } - private fun annotationWithVararg(a vararg i: Int) {} + private fun annotationWithVararg(@a vararg i: Int) {} - b(E.E1) private val c: Int = 1 + @b(E.E1) private val c: Int = 1 - a b(E.E2) public fun g(@a p1: E) { + @a @b(E.E2) public fun g(@a p1: E) { } var withCustomAccessors: Int = 0 @@ -16,7 +16,7 @@ a public class Annotations private @a constructor(private @property:a @param:a v @a private set - private b(E.E2) companion object { + private @b(E.E2) companion object { } diff --git a/idea/testData/decompiler/stubBuilder/SecondaryConstructors/SecondaryConstructors.kt b/idea/testData/decompiler/stubBuilder/SecondaryConstructors/SecondaryConstructors.kt index 7ee8627aeed..e3d0f241bac 100644 --- a/idea/testData/decompiler/stubBuilder/SecondaryConstructors/SecondaryConstructors.kt +++ b/idea/testData/decompiler/stubBuilder/SecondaryConstructors/SecondaryConstructors.kt @@ -4,7 +4,7 @@ class SecondaryConstructors(x: Boolean) { init { } - anno constructor(x: String) : this(x == "abc") { + @anno constructor(x: String) : this(x == "abc") { } init { @@ -19,7 +19,7 @@ class SecondaryConstructors(x: Boolean) { } class Nested { - anno constructor(z: Int) {} + @anno constructor(z: Int) {} internal constructor() {} } } diff --git a/idea/testData/decompiler/stubBuilder/TopLevelMembersAnnotatedKt/topLevelMembersAnnotated.kt b/idea/testData/decompiler/stubBuilder/TopLevelMembersAnnotatedKt/topLevelMembersAnnotated.kt index ac9b4332253..0652180f30b 100644 --- a/idea/testData/decompiler/stubBuilder/TopLevelMembersAnnotatedKt/topLevelMembersAnnotated.kt +++ b/idea/testData/decompiler/stubBuilder/TopLevelMembersAnnotatedKt/topLevelMembersAnnotated.kt @@ -4,7 +4,7 @@ import d.e.f.* @property:a @property:b val i: Int = 0 -a b fun f(@a @b p1: C): Int = 0 +@a @b fun f(@a @b p1: C): Int = 0 class C \ No newline at end of file diff --git a/idea/testData/joinLines/declarationAndAssignment/propertyWithAnnotation.kt b/idea/testData/joinLines/declarationAndAssignment/propertyWithAnnotation.kt index 5e115d86683..6990c24797f 100644 --- a/idea/testData/joinLines/declarationAndAssignment/propertyWithAnnotation.kt +++ b/idea/testData/joinLines/declarationAndAssignment/propertyWithAnnotation.kt @@ -1,4 +1,4 @@ fun foo() { - @volatile var v: Int + @Volatile var v: Int v = 1 } \ No newline at end of file diff --git a/idea/testData/joinLines/declarationAndAssignment/propertyWithAnnotation.kt.after b/idea/testData/joinLines/declarationAndAssignment/propertyWithAnnotation.kt.after index c3fb52a5802..2b0afcac0d7 100644 --- a/idea/testData/joinLines/declarationAndAssignment/propertyWithAnnotation.kt.after +++ b/idea/testData/joinLines/declarationAndAssignment/propertyWithAnnotation.kt.after @@ -1,3 +1,3 @@ fun foo() { - @volatile var v: Int = 1 + @Volatile var v: Int = 1 } \ No newline at end of file diff --git a/idea/testData/kotlinAndJavaChecker/JvmOverloadsFunctions.kt b/idea/testData/kotlinAndJavaChecker/JvmOverloadsFunctions.kt index d81e102593f..9f58562a0bf 100644 --- a/idea/testData/kotlinAndJavaChecker/JvmOverloadsFunctions.kt +++ b/idea/testData/kotlinAndJavaChecker/JvmOverloadsFunctions.kt @@ -2,7 +2,7 @@ package test.kotlin interface A -kotlin.jvm.jvmOverloads +@kotlin.jvm.JvmOverloads public fun foo(k: Class, a: A, b: Boolean = false, s: String="hello"): List { println("$b $s") return listOf() diff --git a/idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt b/idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt index dd7034c9648..0fa89094e59 100644 --- a/idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt +++ b/idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt @@ -1,4 +1,4 @@ -// "Mark with @HiddenDeclaration and @deprecated" "true" +// "Mark with @HiddenDeclaration and @Deprecated" "true" import java.io.File val File.name: String diff --git a/idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt.after b/idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt.after index e9c6bbcf62d..7d7bd494c69 100644 --- a/idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt.after +++ b/idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt.after @@ -1,7 +1,7 @@ -// "Mark with @HiddenDeclaration and @deprecated" "true" +// "Mark with @HiddenDeclaration and @Deprecated" "true" import java.io.File @HiddenDeclaration -@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("name")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("name")) val File.name: String get() = getName() \ No newline at end of file diff --git a/idea/testData/quickfix/modifiers/openMemberInFinalClass4.kt b/idea/testData/quickfix/modifiers/openMemberInFinalClass4.kt index 118c9b3858e..ece575d6bdc 100644 --- a/idea/testData/quickfix/modifiers/openMemberInFinalClass4.kt +++ b/idea/testData/quickfix/modifiers/openMemberInFinalClass4.kt @@ -1,4 +1,4 @@ // "Make 'A' open" "true" -deprecated("") class A() { +@Deprecated("") class A() { open fun foo() {} } diff --git a/idea/testData/quickfix/modifiers/openMemberInFinalClass4.kt.after b/idea/testData/quickfix/modifiers/openMemberInFinalClass4.kt.after index 330aa997717..a7bc0267476 100644 --- a/idea/testData/quickfix/modifiers/openMemberInFinalClass4.kt.after +++ b/idea/testData/quickfix/modifiers/openMemberInFinalClass4.kt.after @@ -1,4 +1,4 @@ // "Make 'A' open" "true" -deprecated("") open class A() { - open fun foo() {} +@Deprecated("") open class A() { + open fun foo() {} } diff --git a/jps-plugin/testData/incremental/custom/javaConstantChangedUsedInKotlin/usage.kt b/jps-plugin/testData/incremental/custom/javaConstantChangedUsedInKotlin/usage.kt index 9f972262826..bb0b5cb52c0 100644 --- a/jps-plugin/testData/incremental/custom/javaConstantChangedUsedInKotlin/usage.kt +++ b/jps-plugin/testData/incremental/custom/javaConstantChangedUsedInKotlin/usage.kt @@ -1,2 +1,2 @@ -deprecated(JavaClass.CONST + JavaClass.CONST) +@Deprecated(JavaClass.CONST + JavaClass.CONST) class Usage diff --git a/jps-plugin/testData/incremental/custom/javaConstantUnchangedUsedInKotlin/usage.kt b/jps-plugin/testData/incremental/custom/javaConstantUnchangedUsedInKotlin/usage.kt index 9f972262826..bb0b5cb52c0 100644 --- a/jps-plugin/testData/incremental/custom/javaConstantUnchangedUsedInKotlin/usage.kt +++ b/jps-plugin/testData/incremental/custom/javaConstantUnchangedUsedInKotlin/usage.kt @@ -1,2 +1,2 @@ -deprecated(JavaClass.CONST + JavaClass.CONST) +@Deprecated(JavaClass.CONST + JavaClass.CONST) class Usage diff --git a/jps-plugin/testData/incremental/multiModule/constantValueChanged/module2_usage.kt b/jps-plugin/testData/incremental/multiModule/constantValueChanged/module2_usage.kt index 50c87e8aeb3..5275dca6468 100644 --- a/jps-plugin/testData/incremental/multiModule/constantValueChanged/module2_usage.kt +++ b/jps-plugin/testData/incremental/multiModule/constantValueChanged/module2_usage.kt @@ -1,4 +1,4 @@ package usage -deprecated(test.CONST + test.CONST) +@Deprecated(test.CONST + test.CONST) class Usage diff --git a/jps-plugin/testData/incremental/pureKotlin/allConstants/usage.kt b/jps-plugin/testData/incremental/pureKotlin/allConstants/usage.kt index a52256d1a83..afb25dfcf37 100644 --- a/jps-plugin/testData/incremental/pureKotlin/allConstants/usage.kt +++ b/jps-plugin/testData/incremental/pureKotlin/allConstants/usage.kt @@ -1,4 +1,4 @@ package test -deprecated("$b $s $i $l $f $d $bb $c $str") +@Deprecated("$b $s $i $l $f $d $bb $c $str") class Usage diff --git a/jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/usage.kt b/jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/usage.kt index 92fe20c977b..dbeb3fbf86c 100644 --- a/jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/usage.kt +++ b/jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/usage.kt @@ -1,4 +1,4 @@ package test -deprecated(Klass.CONST + Klass.CONST) +@Deprecated(Klass.CONST + Klass.CONST) class Usage diff --git a/jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/usage.kt b/jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/usage.kt index 993031ad991..81506d4f37f 100644 --- a/jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/usage.kt +++ b/jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/usage.kt @@ -1,4 +1,4 @@ package test -deprecated(CONST + Klass.CONST) +@Deprecated(CONST + Klass.CONST) class Usage diff --git a/jps-plugin/testData/incremental/pureKotlin/fileWithConstantRemoved/usage.kt b/jps-plugin/testData/incremental/pureKotlin/fileWithConstantRemoved/usage.kt index 2781036fbd6..80d9d873228 100644 --- a/jps-plugin/testData/incremental/pureKotlin/fileWithConstantRemoved/usage.kt +++ b/jps-plugin/testData/incremental/pureKotlin/fileWithConstantRemoved/usage.kt @@ -1,5 +1,5 @@ package usage -deprecated(test.CONST) +@Deprecated(test.CONST) val usage = "" diff --git a/jps-plugin/testData/incremental/pureKotlin/objectConstantChanged/usage.kt b/jps-plugin/testData/incremental/pureKotlin/objectConstantChanged/usage.kt index 50ae79cf3fb..d35df24ec9f 100644 --- a/jps-plugin/testData/incremental/pureKotlin/objectConstantChanged/usage.kt +++ b/jps-plugin/testData/incremental/pureKotlin/objectConstantChanged/usage.kt @@ -1,4 +1,4 @@ package test -deprecated(Object.CONST + Object.CONST) +@Deprecated(Object.CONST + Object.CONST) class Usage \ No newline at end of file diff --git a/jps-plugin/testData/incremental/pureKotlin/optionalParameter/fun.kt b/jps-plugin/testData/incremental/pureKotlin/optionalParameter/fun.kt index b4f268492af..911f5ceeebc 100644 --- a/jps-plugin/testData/incremental/pureKotlin/optionalParameter/fun.kt +++ b/jps-plugin/testData/incremental/pureKotlin/optionalParameter/fun.kt @@ -1,6 +1,6 @@ package test -kotlin.jvm.jvmOverloads +@kotlin.jvm.JvmOverloads fun f(a: String, b: Int = 5) { } \ No newline at end of file diff --git a/jps-plugin/testData/incremental/pureKotlin/packageConstantChanged/usage.kt b/jps-plugin/testData/incremental/pureKotlin/packageConstantChanged/usage.kt index cb0f4ce8687..5ce8a2a89f7 100644 --- a/jps-plugin/testData/incremental/pureKotlin/packageConstantChanged/usage.kt +++ b/jps-plugin/testData/incremental/pureKotlin/packageConstantChanged/usage.kt @@ -1,4 +1,4 @@ package test -deprecated(CONST + CONST) +@Deprecated(CONST + CONST) class Usage diff --git a/jps-plugin/testData/incremental/pureKotlin/topLevelMembersInTwoFiles/b.kt b/jps-plugin/testData/incremental/pureKotlin/topLevelMembersInTwoFiles/b.kt index 1580ba620dc..8505df45d7d 100644 --- a/jps-plugin/testData/incremental/pureKotlin/topLevelMembersInTwoFiles/b.kt +++ b/jps-plugin/testData/incremental/pureKotlin/topLevelMembersInTwoFiles/b.kt @@ -16,7 +16,7 @@ var fieldlessVar: String get() = "" set(value) {} -deprecated("") +@Deprecated("") val fieldlessValWithAnnotation: String get() = "" diff --git a/jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/usage.kt b/jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/usage.kt index 5c0e712d868..83d2b3b2525 100644 --- a/jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/usage.kt +++ b/jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/usage.kt @@ -1,4 +1,4 @@ package test -deprecated(Trait.CONST + Trait.CONST) +@Deprecated(Trait.CONST + Trait.CONST) class Usage diff --git a/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantChanged/usage.kt b/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantChanged/usage.kt index 9f972262826..bb0b5cb52c0 100644 --- a/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantChanged/usage.kt +++ b/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantChanged/usage.kt @@ -1,2 +1,2 @@ -deprecated(JavaClass.CONST + JavaClass.CONST) +@Deprecated(JavaClass.CONST + JavaClass.CONST) class Usage diff --git a/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantUnchanged/usage.kt b/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantUnchanged/usage.kt index 9f972262826..bb0b5cb52c0 100644 --- a/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantUnchanged/usage.kt +++ b/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantUnchanged/usage.kt @@ -1,2 +1,2 @@ -deprecated(JavaClass.CONST + JavaClass.CONST) +@Deprecated(JavaClass.CONST + JavaClass.CONST) class Usage diff --git a/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/addOptionalParameter/fun.kt.new b/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/addOptionalParameter/fun.kt.new index b4f268492af..911f5ceeebc 100644 --- a/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/addOptionalParameter/fun.kt.new +++ b/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/addOptionalParameter/fun.kt.new @@ -1,6 +1,6 @@ package test -kotlin.jvm.jvmOverloads +@kotlin.jvm.JvmOverloads fun f(a: String, b: Int = 5) { } \ No newline at end of file diff --git a/plugins/annotation-collector/testData/collectToFile/annotationInSameFile/annotationInSameFile.kt b/plugins/annotation-collector/testData/collectToFile/annotationInSameFile/annotationInSameFile.kt index 4729fcedb22..c6f4a19b6c3 100644 --- a/plugins/annotation-collector/testData/collectToFile/annotationInSameFile/annotationInSameFile.kt +++ b/plugins/annotation-collector/testData/collectToFile/annotationInSameFile/annotationInSameFile.kt @@ -3,9 +3,9 @@ package org.test @Retention(AnnotationRetention.BINARY) public annotation class SomeAnnotation -SomeAnnotation public class SomeClass { +@SomeAnnotation public class SomeClass { - SomeAnnotation public fun annotatedFunction() { + @SomeAnnotation public fun annotatedFunction() { } diff --git a/plugins/annotation-collector/testData/collectToFile/classAnnotations/classAnnotations.kt b/plugins/annotation-collector/testData/collectToFile/classAnnotations/classAnnotations.kt index c82236d32b8..f1c2f9d177b 100644 --- a/plugins/annotation-collector/testData/collectToFile/classAnnotations/classAnnotations.kt +++ b/plugins/annotation-collector/testData/collectToFile/classAnnotations/classAnnotations.kt @@ -1,5 +1,5 @@ package org.test -java.lang.Deprecated public class SomeClass +@java.lang.Deprecated public class SomeClass -java.lang.Deprecated public object SomeObject \ No newline at end of file +@java.lang.Deprecated public object SomeObject \ No newline at end of file diff --git a/plugins/annotation-collector/testData/collectToFile/defaultPackage/defaultPackage.kt b/plugins/annotation-collector/testData/collectToFile/defaultPackage/defaultPackage.kt index 18259fb5df8..a24f39e9776 100644 --- a/plugins/annotation-collector/testData/collectToFile/defaultPackage/defaultPackage.kt +++ b/plugins/annotation-collector/testData/collectToFile/defaultPackage/defaultPackage.kt @@ -2,7 +2,7 @@ data public class SomeClass { @java.lang.Deprecated public var annotatedProperty: String? = null - java.lang.Deprecated public inline fun annotatedFunction() { + @java.lang.Deprecated public inline fun annotatedFunction() { } diff --git a/plugins/annotation-collector/testData/collectToFile/fieldAnnotations/fieldAnnotations.kt b/plugins/annotation-collector/testData/collectToFile/fieldAnnotations/fieldAnnotations.kt index 587723af05f..44e2419ab8c 100644 --- a/plugins/annotation-collector/testData/collectToFile/fieldAnnotations/fieldAnnotations.kt +++ b/plugins/annotation-collector/testData/collectToFile/fieldAnnotations/fieldAnnotations.kt @@ -2,10 +2,10 @@ package org.test public class SomeClass { - java.lang.Deprecated + @java.lang.Deprecated public val annotatedVal: String? = null - java.lang.Deprecated + @java.lang.Deprecated public var annotatedVar: Int = 5 } \ No newline at end of file diff --git a/plugins/annotation-collector/testData/collectToFile/localClasses/localClasses.kt b/plugins/annotation-collector/testData/collectToFile/localClasses/localClasses.kt index 03af3f4de36..afe3277b6d2 100644 --- a/plugins/annotation-collector/testData/collectToFile/localClasses/localClasses.kt +++ b/plugins/annotation-collector/testData/collectToFile/localClasses/localClasses.kt @@ -5,7 +5,7 @@ public class SomeClass { public fun someFunction() { @java.lang.Deprecated class LocalClass { - public java.lang.Deprecated var annotatedProperty: String? = null + public @java.lang.Deprecated var annotatedProperty: String? = null public inline fun annotatedFunction() { diff --git a/plugins/annotation-collector/testData/collectToFile/nestedClasses/nestedClasses.kt b/plugins/annotation-collector/testData/collectToFile/nestedClasses/nestedClasses.kt index 6847ad48865..b589bbcdd2a 100644 --- a/plugins/annotation-collector/testData/collectToFile/nestedClasses/nestedClasses.kt +++ b/plugins/annotation-collector/testData/collectToFile/nestedClasses/nestedClasses.kt @@ -2,27 +2,27 @@ package org.test public class SomeClass { - java.lang.Deprecated + @java.lang.Deprecated companion object { } - java.lang.Deprecated + @java.lang.Deprecated object SomeInnerObject { } - java.lang.Deprecated + @java.lang.Deprecated inner class InnerClass { - java.lang.Deprecated + @java.lang.Deprecated inner class InnerClassInInnerClass { } } - java.lang.Deprecated + @java.lang.Deprecated class NestedClass { } diff --git a/plugins/annotation-collector/testData/collectToFile/platformStatic/annotations.txt b/plugins/annotation-collector/testData/collectToFile/platformStatic/annotations.txt index 51b1222d98d..2c683a6adf5 100644 --- a/plugins/annotation-collector/testData/collectToFile/platformStatic/annotations.txt +++ b/plugins/annotation-collector/testData/collectToFile/platformStatic/annotations.txt @@ -1,4 +1,4 @@ -a kotlin.platform.platformStatic 0 +a kotlin.jvm.JvmStatic 0 p org.test 0 m 0 0/SomeClass$Companion a a kotlin.inline 1 diff --git a/plugins/annotation-collector/testData/collectToFile/platformStatic/platformStatic.kt b/plugins/annotation-collector/testData/collectToFile/platformStatic/platformStatic.kt index a891af9ec55..2599b247fa9 100644 --- a/plugins/annotation-collector/testData/collectToFile/platformStatic/platformStatic.kt +++ b/plugins/annotation-collector/testData/collectToFile/platformStatic/platformStatic.kt @@ -1,11 +1,9 @@ package org.test -import kotlin.platform.platformStatic - public class SomeClass { companion object { - platformStatic inline fun a() { + @JvmStatic inline fun a() { } }