From c9f79c2d05cc776afb73e22a109dfcb8a770b7e4 Mon Sep 17 00:00:00 2001 From: Denis Zharkov Date: Tue, 9 Jun 2015 20:30:52 +0300 Subject: [PATCH] Adjust testData: get rid of obsolete annotations --- .../asJava/annotations/ExtraAnnotations.kt | 2 +- .../asJava/lightClassStructure/Declared.kt | 6 ++--- .../nullabilityAnnotations/Class.kt | 12 ++++----- .../nullabilityAnnotations/JvmOverloads.kt | 2 +- .../nullabilityAnnotations/_DefaultPackage.kt | 12 ++++----- .../functionExpression/functionExpression.kt | 2 +- .../functionExpressionWithName.kt | 2 +- .../codegen/box/localClasses/kt3389.kt | 2 +- ...ExtensionPropertiesWithoutBackingFields.kt | 4 +-- .../codegen/boxInline/simple/simpleEnum.2.kt | 2 +- .../jvmOverloads/generics/generics.kt | 2 +- .../boxWithJava/jvmOverloads/simple/simple.kt | 2 +- .../annotations/annotatedEnumEntry.kt | 4 +-- .../annotations/annotatedLambda/lambda.kt | 2 +- .../annotations/delegatedPropertySetter.kt | 2 +- .../property/platformNamedAccessors.kt | 4 +-- .../fullJdk/native/nativePropertyAccessors.kt | 18 ++++++------- .../jvmOverloads/companionObject.kt | 2 +- .../jvmOverloads/defaultsNotAtEnd.kt | 2 +- .../jvmOverloads/doubleParameters.kt | 2 +- .../jvmOverloads/extensionMethod.kt | 2 +- .../jvmOverloads/multipleDefaultParameters.kt | 2 +- .../jvmOverloads/nonDefaultParameter.kt | 2 +- .../jvmOverloads/primaryConstructor.kt | 2 +- .../jvmOverloads/secondaryConstructor.kt | 2 +- .../boxWithStdlib/jvmOverloads/simple.kt | 2 +- .../platformNames/callableReference.kt | 2 +- .../platformNames/clashingErasure.kt | 2 +- .../platformNames/functionName.kt | 2 +- .../platformNames/propertyName.kt | 4 +-- .../platformStatic/postfixInc.kt | 4 +-- .../boxWithStdlib/platformStatic/prefixInc.kt | 4 +-- .../platformStatic/propertyAccess.kt | 4 +-- .../reflection/genericSignature/kt6106.kt | 2 +- .../properties/syntheticMethod/inClass.kt | 2 +- .../properties/syntheticMethod/inTrait.kt | 2 +- .../properties/syntheticMethod/topLevel.kt | 2 +- .../method/platformName/PlatformName.kt | 2 +- .../method/throws/Constructor.kt | 8 +++--- .../method/throws/DefaultArgs.kt | 2 +- .../simpleClassObjectProperty.kt | 6 ++--- .../platformStatic/simpleObjectProperty.kt | 6 ++--- .../property/platformName/PlatformName.kt | 4 +-- .../InlinedConstants.A.kt | 2 +- .../PlatformNames.A.kt | 6 ++--- .../resolve/resolveAnnotatedLambdaArgument.kt | 6 ++--- .../annotations/AnnotatedAnnotation.kt | 2 +- .../classMembers/ClassObjectPropertyField.kt | 2 +- .../annotations/classMembers/Constructor.kt | 2 +- .../annotations/classMembers/Getter.kt | 2 +- .../annotations/classMembers/PropertyField.kt | 2 +- .../annotations/classMembers/Setter.kt | 2 +- .../annotations/packageMembers/Getter.kt | 2 +- .../packageMembers/PropertyField.kt | 2 +- .../annotations/packageMembers/Setter.kt | 2 +- .../annotations/parameters/Constructor.kt | 2 +- .../annotations/parameters/EnumConstructor.kt | 2 +- .../parameters/ExtensionFunction.kt | 2 +- .../parameters/ExtensionFunctionInClass.kt | 2 +- .../parameters/ExtensionPropertySetter.kt | 2 +- .../annotations/parameters/FunctionInClass.kt | 2 +- .../annotations/parameters/FunctionInTrait.kt | 2 +- .../parameters/InnerClassConstructor.kt | 4 +-- .../annotations/parameters/ManyAnnotations.kt | 4 +-- .../parameters/PropertySetterInClass.kt | 2 +- .../parameters/TopLevelFunction.kt | 2 +- .../parameters/TopLevelPropertySetter.kt | 2 +- .../propertiesWithoutBackingFields/Class.kt | 2 +- .../ClassObject.kt | 2 +- .../ExtensionsWithSameNameClass.kt | 6 ++--- .../ExtensionsWithSameNamePackage.kt | 6 ++--- .../NestedTrait.kt | 2 +- .../TopLevel.kt | 2 +- .../propertiesWithoutBackingFields/Trait.kt | 2 +- .../TraitClassObject.kt | 2 +- .../mutability/LoadIterable.kt | 4 +-- .../mutability/LoadIterableWithConflict.kt | 4 +-- .../mutability/LoadIterableWithNullability.kt | 4 +-- .../mutability/LoadIterableWithPropagation.kt | 4 +-- .../platformNames/functionName.kt | 10 +++---- compiler/testData/renderer/Classes.kt | 6 ++--- compiler/testData/renderer/FunctionTypes.kt | 6 ++--- .../testData/repl/regressions/kt6843.repl | 2 +- .../DefaultParamsOfLocalFunctions.resolve | 2 +- .../testData/resolveAnnotations/testFile.kt | 26 +++++++++---------- .../builtinsSerializer/annotationTargets.kt | 2 +- .../local/annotationsInLocalClass.kt | 2 +- .../function/deprecatedFlag/emptyGetter.kt | 2 +- .../function/deprecatedFlag/emptySetter.kt | 2 +- .../function/deprecatedFlag/getter.kt | 2 +- .../function/deprecatedFlag/setter.kt | 2 +- .../kotlin/codegen/AnnotationGenTest.java | 26 +++++++++---------- .../AbstractJvmRuntimeDescriptorLoaderTest.kt | 2 +- .../common/annotations/FunctionAnnotation2.kt | 2 +- .../NoParameterAnnotationAutoPopup2.kt | 2 +- .../annotations/ParameterAnnotation8.kt | 2 +- .../annotations/ParameterAnnotation9.kt | 2 +- .../ParameterAnnotationAutoPopup1.kt | 2 +- .../ParameterAnnotationAutoPopup2.kt | 2 +- .../common/annotations/TopLevelAnnotation2.kt | 2 +- .../common/annotations/TopLevelAnnotation4.kt | 2 +- ...AddImportsClassInSamePackage.dependency.kt | 2 +- .../debugger/smartStepInto/annotation.kt | 2 +- .../decompiledText/Annotations/Annotations.kt | 4 +-- .../AnnotationsOnPrimaryCtr.kt | 2 +- .../stubBuilder/Annotations/Annotations.kt | 12 ++++----- .../topLevelMembersAnnotated.kt | 2 +- .../formatter/PrimaryConstructor.after.kt | 12 ++++----- idea/testData/formatter/PrimaryConstructor.kt | 12 ++++----- .../formatter/SpacesInDeclarations.after.kt | 8 +++--- .../formatter/SpacesInDeclarations.kt | 8 +++--- .../funAnnotationBeforeAnnotation.after.kt | 4 +-- .../funAnnotationBeforeAnnotation.kt | 4 +-- ...unAnnotationBeforeAnnotationEntry.after.kt | 2 +- .../funAnnotationBeforeAnnotationEntry.kt | 2 +- .../funAnnotationBeforeModifiers.after.kt | 2 +- .../funAnnotationBeforeModifiers.kt | 2 +- ...unAnnotationEntryBeforeAnnotation.after.kt | 2 +- .../funAnnotationEntryBeforeAnnotation.kt | 2 +- .../funModifierBeforeAnnotation.after.kt | 2 +- .../funModifierBeforeAnnotation.kt | 2 +- .../propertyWithAnnotation.kt | 2 +- .../propertyWithAnnotation.kt.after | 2 +- .../falsePostfixOperator.before.Main.kt | 2 +- .../annotationEntry/annotationNoParamList.kt | 2 +- .../annotationNoParamList.kt.after | 2 +- .../annotationEntry/annotationNoParams.kt | 2 +- .../annotationNoParams.kt.after | 2 +- .../annotationEntry/annotationWithParams.kt | 2 +- .../annotationWithParams.kt.after | 2 +- .../annotationWithTypeParams.kt | 2 +- .../annotationWithTypeParams.kt.after | 2 +- .../annotationEntry/singleArgAnnotation.kt | 2 +- .../singleArgAnnotation.kt.after | 2 +- .../singleNamedArgAnnotation.kt | 2 +- .../singleNamedArgAnnotation.kt.after | 2 +- .../callExpression/callInAnnotationEntry.kt | 2 +- .../callInAnnotationEntry.kt.after | 2 +- ...nAnnotationEntryWithJavaQualifier.after.kt | 2 +- ...ationEntryWithJavaQualifier.before.Main.kt | 2 +- .../callWithTypeArgsInAnnotationEntry.kt | 2 +- ...callWithTypeArgsInAnnotationEntry.kt.after | 2 +- .../singleArgCallInAnnotationEntry.kt | 2 +- .../singleArgCallInAnnotationEntry.kt.after | 2 +- .../singleNamedArgCallInAnnotationEntry.kt | 2 +- ...ngleNamedArgCallInAnnotationEntry.kt.after | 2 +- .../manyFilesMultiple.after.kt | 4 +-- .../manyFilesMultiple.before.Main.kt | 4 +-- .../manyFilesMultiple.after.kt | 6 ++--- .../manyFilesMultiple.before.Main.kt | 6 ++--- .../modifiers/cannotMakeClassAnnotation.kt | 2 +- .../modifiers/notAnAnnotationClass.kt | 2 +- .../modifiers/notAnAnnotationClass.kt.after | 2 +- .../topLevelFunctionUnrelatedAnnotation.kt | 2 +- ...pLevelFunctionUnrelatedAnnotation.kt.after | 2 +- .../errorRecovery/unresolvedAnnotation.kt | 2 +- .../unresolvedAnnotation.kt.after | 2 +- .../suppress/forStatement/annotatedExpr.kt | 2 +- .../forStatement/annotatedExpr.kt.after | 2 +- .../ParameterModifiersAfter.kt | 2 +- .../ParameterModifiersBefore.kt | 2 +- .../parameters/misc/qualifiedAnnotation.kt | 2 +- .../misc/qualifiedAnnotation.kt.after | 2 +- .../resolve/references/AnnotationOnFile.kt | 2 +- .../references/AnnotationOnFileWithImport.kt | 2 +- .../resolve/references/AnnotationParameter.kt | 2 +- .../references/AnnotationTypeParameter.kt | 2 +- .../annotations/testAnnotationsOnClass.kt | 4 +-- idea/testData/search/junit/testJunit4.kt | 8 +++--- idea/testData/search/junit/testJunit4Alias.kt | 2 +- .../stubs/AnnotationOnLocalFunction.kt | 2 +- .../testData/stubs/AnnotationsOnPrimaryCtr.kt | 2 +- idea/testData/stubs/DanglingAnnotations.kt | 4 +-- .../stubs/ManyAnnotationsOnFunction.kt | 2 +- ...PropertyAsPropertyInitalizerInvalidCode.kt | 2 +- idea/testData/stubs/TypeAnnotation.kt | 2 +- .../pureKotlin/annotations/annotations.kt | 6 ++--- .../cases/anonymousObjectInlineMethod.kt | 2 +- .../cases/callableReferenceOfLocalInline.kt | 2 +- .../cases/localInlineExtensionFunction.kt | 4 +-- .../inline/cases/localInlineFunction.kt | 4 +-- .../cases/localInlineFunctionComplex.kt | 8 +++--- .../localInlineFunctionDeclaredInLambda.kt | 4 +-- .../cases/localInlineFunctionNameClash.kt | 2 +- .../cases/localInlineFunctionReference.kt | 2 +- .../testData/inline/cases/simpleEnum.kt | 2 +- ...lsInlinedClashingAtFunctionsWithClosure.kt | 6 ++--- .../annotatedGettersSetters.kt | 6 ++--- .../anonymousClasses/anonymousClasses.kt | 2 +- .../constructors/constructors.kt | 4 +-- .../defaultPackage/defaultPackage.kt | 2 +- .../localClasses/localClasses.kt | 2 +- .../methodAnnotations/methodAnnotations.kt | 2 +- 193 files changed, 322 insertions(+), 322 deletions(-) diff --git a/compiler/testData/asJava/annotations/ExtraAnnotations.kt b/compiler/testData/asJava/annotations/ExtraAnnotations.kt index 7325aad2694..75140d1101f 100644 --- a/compiler/testData/asJava/annotations/ExtraAnnotations.kt +++ b/compiler/testData/asJava/annotations/ExtraAnnotations.kt @@ -1,4 +1,4 @@ annotation class Foo(val s: String) -[Foo("...")] +@Foo("...") class ExtraAnnotations \ No newline at end of file diff --git a/compiler/testData/asJava/lightClassStructure/Declared.kt b/compiler/testData/asJava/lightClassStructure/Declared.kt index e09d095bfe4..34e574900b6 100644 --- a/compiler/testData/asJava/lightClassStructure/Declared.kt +++ b/compiler/testData/asJava/lightClassStructure/Declared.kt @@ -29,9 +29,9 @@ interface Trait deprecated("") class Deprecated kotlin.deprecated("") class DeprecatedFQN kotlin. deprecated /**/ ("") class DeprecatedFQNSpaces -[deprecated("")] class DeprecatedWithBrackets -[kotlin.deprecated("")] class DeprecatedWithBracketsFQN -[kotlin +@[deprecated("")] class DeprecatedWithBrackets +@[kotlin.deprecated("")] class DeprecatedWithBracketsFQN +@[kotlin ./**/deprecated ("")] class DeprecatedWithBracketsFQNSpaces // Generic diff --git a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Class.kt b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Class.kt index 183baad89ed..25d8c9099bf 100644 --- a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Class.kt +++ b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/Class.kt @@ -19,16 +19,16 @@ class Class { var notNullVar: String = "" val notNullValWithGet: String - [Nullable] get() = "" + @[Nullable] get() = "" var notNullVarWithGetSet: String - [Nullable] get() = "" - [Nullable] set(v) {} + @[Nullable] get() = "" + @[Nullable] set(v) {} val nullableValWithGet: String? - [NotNull] get() = "" + @[NotNull] get() = "" var nullableVarWithGetSet: String? - [NotNull] get() = "" - [NotNull] set(v) {} + @[NotNull] get() = "" + @[NotNull] set(v) {} } \ No newline at end of file diff --git a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/JvmOverloads.kt b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/JvmOverloads.kt index ce4d591306c..66d2963eb02 100644 --- a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/JvmOverloads.kt +++ b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/JvmOverloads.kt @@ -1,7 +1,7 @@ // C class C { - [kotlin.jvm.jvmOverloads] public fun foo(o: String = "O", s1: String, k: String = "K", s2: String?): String { + @[kotlin.jvm.jvmOverloads] public fun foo(o: String = "O", s1: String, k: String = "K", s2: String?): String { return o + k } } diff --git a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/_DefaultPackage.kt b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/_DefaultPackage.kt index fddf88deeee..238976fc9a6 100644 --- a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/_DefaultPackage.kt +++ b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/_DefaultPackage.kt @@ -18,18 +18,18 @@ val notNullVal: String = "" var notNullVar: String = "" val notNullValWithGet: String - [Nullable] get() = "" + @[Nullable] get() = "" var notNullVarWithGetSet: String - [Nullable] get() = "" - [Nullable] set(v) {} + @[Nullable] get() = "" + @[Nullable] set(v) {} val nullableValWithGet: String? - [NotNull] get() = "" + @[NotNull] get() = "" var nullableVarWithGetSet: String? - [NotNull] get() = "" - [NotNull] set(v) {} + @NotNull get() = "" + @NotNull set(v) {} private val privateNn: String = "" private val privateN: String? = "" diff --git a/compiler/testData/codegen/box/functions/functionExpression/functionExpression.kt b/compiler/testData/codegen/box/functions/functionExpression/functionExpression.kt index 49cfea50d5b..0936de3f951 100644 --- a/compiler/testData/codegen/box/functions/functionExpression/functionExpression.kt +++ b/compiler/testData/codegen/box/functions/functionExpression/functionExpression.kt @@ -18,7 +18,7 @@ fun box() : String { if( 1.(fun Int.(i: Int) = i + this)(1) != 2) return "test 6 failed"; if( (fooT1()("mama")) != "mama") return "test 7 failed"; - val a = [A] fun Int.() = this + 1 + val a = @A fun Int.() = this + 1 if (1.a() != 2) return "test 8 failed" val b = ( fun Int.() = this + 1) if (1.b() != 2) return "test 9 failed" diff --git a/compiler/testData/codegen/box/functions/functionExpression/functionExpressionWithName.kt b/compiler/testData/codegen/box/functions/functionExpression/functionExpressionWithName.kt index 86e94348762..8b58c18ff02 100644 --- a/compiler/testData/codegen/box/functions/functionExpression/functionExpressionWithName.kt +++ b/compiler/testData/codegen/box/functions/functionExpression/functionExpressionWithName.kt @@ -18,7 +18,7 @@ fun box() : String { if( 1.(fun Int.name(i: Int) = i + this)(1) != 2) return "test 6 failed"; if( (fooT1()("mama")) != "mama") return "test 7 failed"; - val a = [A] fun Int.name() = this + 1 // name + val a = @A fun Int.name() = this + 1 // name if (1.a() != 2) return "test 8 failed" val b = ( fun Int.name() = this + 1) if (1.b() != 2) return "test 9 failed" diff --git a/compiler/testData/codegen/box/localClasses/kt3389.kt b/compiler/testData/codegen/box/localClasses/kt3389.kt index dea8cfab8eb..f5740b70ea1 100644 --- a/compiler/testData/codegen/box/localClasses/kt3389.kt +++ b/compiler/testData/codegen/box/localClasses/kt3389.kt @@ -3,7 +3,7 @@ package t class Reproduce { fun test(): String { - [data] class Foo(val bar: String, val baz: Int) + @data class Foo(val bar: String, val baz: Int) val foo = Foo("OK", 5) return foo.bar } diff --git a/compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt b/compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt index 757416a35f2..678b82c784e 100644 --- a/compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt +++ b/compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt @@ -1,9 +1,9 @@ annotation class Anno -[Anno] val Int.foo: Int +@Anno val Int.foo: Int get() = this -[Anno] val String.foo: Int +@Anno val String.foo: Int get() = 42 fun box() = if (42.foo == 42 && "OK".foo == 42) "OK" else "Fail" diff --git a/compiler/testData/codegen/boxInline/simple/simpleEnum.2.kt b/compiler/testData/codegen/boxInline/simple/simpleEnum.2.kt index ebec1aa2b43..c9fceb2653c 100644 --- a/compiler/testData/codegen/boxInline/simple/simpleEnum.2.kt +++ b/compiler/testData/codegen/boxInline/simple/simpleEnum.2.kt @@ -4,7 +4,7 @@ enum class MyEnum { K; //TODO: KT-4693 - [inline] fun doSmth(a: T) : String { + @inline fun doSmth(a: T) : String { return a.toString() + K.name() } } diff --git a/compiler/testData/codegen/boxWithJava/jvmOverloads/generics/generics.kt b/compiler/testData/codegen/boxWithJava/jvmOverloads/generics/generics.kt index f9b8f775c2e..71adbb0e46e 100644 --- a/compiler/testData/codegen/boxWithJava/jvmOverloads/generics/generics.kt +++ b/compiler/testData/codegen/boxWithJava/jvmOverloads/generics/generics.kt @@ -1,5 +1,5 @@ class C { - [kotlin.jvm.jvmOverloads] public fun foo(o: T, k: String = "K"): String = o.toString() + k + @kotlin.jvm.jvmOverloads public fun foo(o: T, k: String = "K"): String = o.toString() + k } fun box(): String { diff --git a/compiler/testData/codegen/boxWithJava/jvmOverloads/simple/simple.kt b/compiler/testData/codegen/boxWithJava/jvmOverloads/simple/simple.kt index 18ae902d8f2..1376f3849c5 100644 --- a/compiler/testData/codegen/boxWithJava/jvmOverloads/simple/simple.kt +++ b/compiler/testData/codegen/boxWithJava/jvmOverloads/simple/simple.kt @@ -1,5 +1,5 @@ class C { - [kotlin.jvm.jvmOverloads] public fun foo(o: String = "O", k: String = "K"): String = o + k + @kotlin.jvm.jvmOverloads public fun foo(o: String = "O", k: String = "K"): String = o + k } fun box(): String { diff --git a/compiler/testData/codegen/boxWithStdlib/annotations/annotatedEnumEntry.kt b/compiler/testData/codegen/boxWithStdlib/annotations/annotatedEnumEntry.kt index 4d719d78957..95143c59e78 100644 --- a/compiler/testData/codegen/boxWithStdlib/annotations/annotatedEnumEntry.kt +++ b/compiler/testData/codegen/boxWithStdlib/annotations/annotatedEnumEntry.kt @@ -9,12 +9,12 @@ Retention(RetentionPolicy.RUNTIME) annotation class Second(val value: String) enum class E { - [First] + @First E1 { fun foo() = "something" } - [Second("OK")] + @Second("OK") E2 } diff --git a/compiler/testData/codegen/boxWithStdlib/annotations/annotatedLambda/lambda.kt b/compiler/testData/codegen/boxWithStdlib/annotations/annotatedLambda/lambda.kt index 882242a90ee..81a259382c7 100644 --- a/compiler/testData/codegen/boxWithStdlib/annotations/annotatedLambda/lambda.kt +++ b/compiler/testData/codegen/boxWithStdlib/annotations/annotatedLambda/lambda.kt @@ -23,7 +23,7 @@ fun testClass(clazz: Class<*>, name: String) { } fun box(): String { - testClass(foo0([Ann("OK")] { }), "1") + testClass(foo0(@Ann("OK") { }), "1") testClass(foo0( @Ann("OK") { }), "2") testClass(foo0() @Ann("OK") { }, "3") diff --git a/compiler/testData/codegen/boxWithStdlib/annotations/delegatedPropertySetter.kt b/compiler/testData/codegen/boxWithStdlib/annotations/delegatedPropertySetter.kt index c1fb80a3367..24e7376a8a3 100644 --- a/compiler/testData/codegen/boxWithStdlib/annotations/delegatedPropertySetter.kt +++ b/compiler/testData/codegen/boxWithStdlib/annotations/delegatedPropertySetter.kt @@ -5,7 +5,7 @@ annotation class First class MyClass() { public var x: String by Delegate() - [First] set + @First set } class Delegate { diff --git a/compiler/testData/codegen/boxWithStdlib/callableReference/property/platformNamedAccessors.kt b/compiler/testData/codegen/boxWithStdlib/callableReference/property/platformNamedAccessors.kt index 4d7d7cef883..fde996e989d 100644 --- a/compiler/testData/codegen/boxWithStdlib/callableReference/property/platformNamedAccessors.kt +++ b/compiler/testData/codegen/boxWithStdlib/callableReference/property/platformNamedAccessors.kt @@ -2,9 +2,9 @@ import kotlin.platform.platformName import kotlin.reflect.jvm.* var state: String = "value" - [platformName("getter")] + @platformName("getter") get - [platformName("setter")] + @platformName("setter") set fun box(): String { diff --git a/compiler/testData/codegen/boxWithStdlib/fullJdk/native/nativePropertyAccessors.kt b/compiler/testData/codegen/boxWithStdlib/fullJdk/native/nativePropertyAccessors.kt index 1f247513c2e..bff18f98f14 100644 --- a/compiler/testData/codegen/boxWithStdlib/fullJdk/native/nativePropertyAccessors.kt +++ b/compiler/testData/codegen/boxWithStdlib/fullJdk/native/nativePropertyAccessors.kt @@ -1,27 +1,27 @@ class C { companion object { val defaultGetter: Int = 1 - [native] get + @native get var defaultSetter: Int = 1 - [native] get - [native] set + @native get + @native set } val defaultGetter: Int = 1 - [native] get + @native get var defaultSetter: Int = 1 - [native] get - [native] set + @native get + @native set } val defaultGetter: Int = 1 - [native] get + @native get var defaultSetter: Int = 1 - [native] get - [native] set + @native get + @native set fun check(body: () -> Unit, signature: String): String? { try { diff --git a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/companionObject.kt b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/companionObject.kt index ab10d2305a3..7ba1c9fa456 100644 --- a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/companionObject.kt +++ b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/companionObject.kt @@ -1,6 +1,6 @@ class C { companion object { - [kotlin.platform.platformStatic] [kotlin.jvm.jvmOverloads] public fun foo(o: String, k: String = "K"): String { + @kotlin.platform.platformStatic @kotlin.jvm.jvmOverloads public fun foo(o: String, k: String = "K"): String { return o + k } } diff --git a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/defaultsNotAtEnd.kt b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/defaultsNotAtEnd.kt index 83762678de0..e1e0cd332ba 100644 --- a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/defaultsNotAtEnd.kt +++ b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/defaultsNotAtEnd.kt @@ -1,5 +1,5 @@ class C { - [kotlin.jvm.jvmOverloads] public fun foo(o: String = "O", i1: Int, k: String = "K", i2: Int): String { + @kotlin.jvm.jvmOverloads public fun foo(o: String = "O", i1: Int, k: String = "K", i2: Int): String { return o + k } } diff --git a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/doubleParameters.kt b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/doubleParameters.kt index 59e7340893c..50786da1b39 100644 --- a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/doubleParameters.kt +++ b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/doubleParameters.kt @@ -1,5 +1,5 @@ class C { - [kotlin.jvm.jvmOverloads] public fun foo(d1: Double, d2: Double, status: String = "OK"): String { + @kotlin.jvm.jvmOverloads public fun foo(d1: Double, d2: Double, status: String = "OK"): String { return if (d1 + d2 == 3.0) status else "fail" } } diff --git a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/extensionMethod.kt b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/extensionMethod.kt index a2b1d329c48..f0ba749624f 100644 --- a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/extensionMethod.kt +++ b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/extensionMethod.kt @@ -1,7 +1,7 @@ class C { } -[kotlin.jvm.jvmOverloads] fun C.foo(o: String, k: String = "K"): String { +@kotlin.jvm.jvmOverloads fun C.foo(o: String, k: String = "K"): String { return o + k } diff --git a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/multipleDefaultParameters.kt b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/multipleDefaultParameters.kt index ef8a6537c69..700fff6bdf1 100644 --- a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/multipleDefaultParameters.kt +++ b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/multipleDefaultParameters.kt @@ -1,5 +1,5 @@ class C { - [kotlin.jvm.jvmOverloads] public fun foo(o: String = "O", k: String = "K"): String { + @kotlin.jvm.jvmOverloads public fun foo(o: String = "O", k: String = "K"): String { return o + k } } diff --git a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/nonDefaultParameter.kt b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/nonDefaultParameter.kt index 08e7a98cab9..26a69c6b1ed 100644 --- a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/nonDefaultParameter.kt +++ b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/nonDefaultParameter.kt @@ -1,5 +1,5 @@ class C { - [kotlin.jvm.jvmOverloads] public fun foo(o: String, k: String = "K"): String { + @kotlin.jvm.jvmOverloads public fun foo(o: String, k: String = "K"): String { return o + k } } diff --git a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/primaryConstructor.kt b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/primaryConstructor.kt index 7c81d01bfa5..2a404b1c323 100644 --- a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/primaryConstructor.kt +++ b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/primaryConstructor.kt @@ -1,4 +1,4 @@ -class C [kotlin.jvm.jvmOverloads] (s1: String, s2: String = "K") { +class C @kotlin.jvm.jvmOverloads constructor(s1: String, s2: String = "K") { public val status: String = s1 + s2 } diff --git a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/secondaryConstructor.kt b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/secondaryConstructor.kt index fe8ca288771..a32423995e4 100644 --- a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/secondaryConstructor.kt +++ b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/secondaryConstructor.kt @@ -1,7 +1,7 @@ class C(val i: Int) { var status = "fail" - [kotlin.jvm.jvmOverloads] constructor(o: String, k: String = "K"): this(-1) { + @kotlin.jvm.jvmOverloads constructor(o: String, k: String = "K"): this(-1) { status = o + k } } diff --git a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/simple.kt b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/simple.kt index ab7b09d77e1..15ef43d6ace 100644 --- a/compiler/testData/codegen/boxWithStdlib/jvmOverloads/simple.kt +++ b/compiler/testData/codegen/boxWithStdlib/jvmOverloads/simple.kt @@ -1,5 +1,5 @@ class C { - [kotlin.jvm.jvmOverloads] public fun foo(s: String = "OK"): String { + @kotlin.jvm.jvmOverloads public fun foo(s: String = "OK"): String { return s } } diff --git a/compiler/testData/codegen/boxWithStdlib/platformNames/callableReference.kt b/compiler/testData/codegen/boxWithStdlib/platformNames/callableReference.kt index 073293901c1..34ad9022557 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformNames/callableReference.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformNames/callableReference.kt @@ -1,6 +1,6 @@ import kotlin.platform.* -[platformName("bar")] +@platformName("bar") fun foo() = "foo" fun box(): String { diff --git a/compiler/testData/codegen/boxWithStdlib/platformNames/clashingErasure.kt b/compiler/testData/codegen/boxWithStdlib/platformNames/clashingErasure.kt index 3ce689eb6cf..369d924d8bb 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformNames/clashingErasure.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformNames/clashingErasure.kt @@ -2,7 +2,7 @@ import kotlin.platform.* fun List.foo() = "foo" -[platformName("fooInt")] +@platformName("fooInt") fun List.foo() = "fooInt" fun box(): String { diff --git a/compiler/testData/codegen/boxWithStdlib/platformNames/functionName.kt b/compiler/testData/codegen/boxWithStdlib/platformNames/functionName.kt index bfcc64535c8..77b1e214f94 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformNames/functionName.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformNames/functionName.kt @@ -1,6 +1,6 @@ import kotlin.platform.* -[platformName("bar")] +@platformName("bar") fun foo() = "foo" fun box(): String { diff --git a/compiler/testData/codegen/boxWithStdlib/platformNames/propertyName.kt b/compiler/testData/codegen/boxWithStdlib/platformNames/propertyName.kt index ca7a0490f0c..b7be965ade4 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformNames/propertyName.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformNames/propertyName.kt @@ -1,9 +1,9 @@ import kotlin.platform.* var v: Int = 1 - [platformName("vget")] + @platformName("vget") get - [platformName("vset")] + @platformName("vset") set fun box(): String { diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/postfixInc.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/postfixInc.kt index bbbdcee45a4..58d53ef9a19 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/postfixInc.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/postfixInc.kt @@ -5,10 +5,10 @@ object A { platformStatic var a: Int = 1 var b: Int = 1 - [platformStatic] get + @platformStatic get var c: Int = 1 - [platformStatic] set + @platformStatic set } diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/prefixInc.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/prefixInc.kt index e42089faab9..42c1f283fa5 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/prefixInc.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/prefixInc.kt @@ -5,10 +5,10 @@ object A { platformStatic var a: Int = 1 var b: Int = 1 - [platformStatic] get + @platformStatic get var c: Int = 1 - [platformStatic] set + @platformStatic set } diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/propertyAccess.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/propertyAccess.kt index 03c59143a01..be4ade19fa6 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/propertyAccess.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/propertyAccess.kt @@ -12,10 +12,10 @@ object A { platformStatic var a: Int = 1 var b: Int = 1 - [platformStatic] get + @platformStatic get var c: Int = 1 - [platformStatic] set + @platformStatic set } diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt6106.kt b/compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt6106.kt index 157b4f4227d..4fdd56f1b90 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt6106.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt6106.kt @@ -7,7 +7,7 @@ open class B class A { companion object { - [platformStatic] + @platformStatic fun a(s: T) : T { return s } diff --git a/compiler/testData/codegen/properties/syntheticMethod/inClass.kt b/compiler/testData/codegen/properties/syntheticMethod/inClass.kt index 0abac3c3ad1..f17c4afc14c 100644 --- a/compiler/testData/codegen/properties/syntheticMethod/inClass.kt +++ b/compiler/testData/codegen/properties/syntheticMethod/inClass.kt @@ -3,6 +3,6 @@ import java.lang.annotation.* Retention(RetentionPolicy.RUNTIME) annotation class SomeAnnotation(val value: String) class A { - [SomeAnnotation("OK")] val property: Int + @SomeAnnotation("OK") val property: Int get() = 42 } diff --git a/compiler/testData/codegen/properties/syntheticMethod/inTrait.kt b/compiler/testData/codegen/properties/syntheticMethod/inTrait.kt index 7f11e0e4012..fecb7aed395 100644 --- a/compiler/testData/codegen/properties/syntheticMethod/inTrait.kt +++ b/compiler/testData/codegen/properties/syntheticMethod/inTrait.kt @@ -3,5 +3,5 @@ import java.lang.annotation.* Retention(RetentionPolicy.RUNTIME) annotation class SomeAnnotation(val value: String) interface T { - [SomeAnnotation("OK")] val property: Int + @SomeAnnotation("OK") val property: Int } diff --git a/compiler/testData/codegen/properties/syntheticMethod/topLevel.kt b/compiler/testData/codegen/properties/syntheticMethod/topLevel.kt index 2041c4d1ac4..9bd6284ea32 100644 --- a/compiler/testData/codegen/properties/syntheticMethod/topLevel.kt +++ b/compiler/testData/codegen/properties/syntheticMethod/topLevel.kt @@ -2,5 +2,5 @@ import java.lang.annotation.* Retention(RetentionPolicy.RUNTIME) annotation class SomeAnnotation(val value: String) -[SomeAnnotation("OK")] val property: Int +@SomeAnnotation("OK") val property: Int get() = 42 diff --git a/compiler/testData/compileJavaAgainstKotlin/method/platformName/PlatformName.kt b/compiler/testData/compileJavaAgainstKotlin/method/platformName/PlatformName.kt index 3013466a2be..8e3bb761b74 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/platformName/PlatformName.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/platformName/PlatformName.kt @@ -2,5 +2,5 @@ package test import kotlin.platform.* -[platformName("bar")] +@platformName("bar") fun foo() {} \ No newline at end of file diff --git a/compiler/testData/compileJavaAgainstKotlin/method/throws/Constructor.kt b/compiler/testData/compileJavaAgainstKotlin/method/throws/Constructor.kt index f1fbb48d89c..cf67599c7ec 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/throws/Constructor.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/throws/Constructor.kt @@ -3,8 +3,8 @@ package test class E1: Exception() class E2: Exception() -class None [throws()]() {} -class One [throws(E1::class)]() -class Two [throws(E1::class, E2::class)]() +class None @throws() constructor() {} +class One @throws(E1::class) constructor() +class Two @throws(E1::class, E2::class) constructor() -class OneWithParam [throws(E1::class)](a: Int) \ No newline at end of file +class OneWithParam @throws(E1::class) constructor(a: Int) \ No newline at end of file diff --git a/compiler/testData/compileJavaAgainstKotlin/method/throws/DefaultArgs.kt b/compiler/testData/compileJavaAgainstKotlin/method/throws/DefaultArgs.kt index 7357d922dea..becfa1897be 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/throws/DefaultArgs.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/throws/DefaultArgs.kt @@ -5,7 +5,7 @@ class E1: Exception() throws(E1::class) jvmOverloads fun one(a: Int = 1) {} -class One [throws(E1::class)] (a: Int = 1) { +class One @throws(E1::class) constructor(a: Int = 1) { throws(E1::class) fun one(a: Int = 1) {} } \ No newline at end of file diff --git a/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObjectProperty.kt b/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObjectProperty.kt index 2102b61952b..dd33c43c3a4 100644 --- a/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObjectProperty.kt +++ b/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObjectProperty.kt @@ -4,11 +4,11 @@ import kotlin.platform.platformStatic class A { companion object { - [platformStatic] val b: String = "OK" + @platformStatic val b: String = "OK" var A.c: String - [platformStatic] get() = "OK" - [platformStatic] set(t: String) {} + @platformStatic get() = "OK" + @platformStatic set(t: String) {} } } diff --git a/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleObjectProperty.kt b/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleObjectProperty.kt index fc0c3462116..cb9c0cafd44 100644 --- a/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleObjectProperty.kt +++ b/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleObjectProperty.kt @@ -3,11 +3,11 @@ package test import kotlin.platform.platformStatic object A { - [platformStatic] val b: String = "OK" + @platformStatic val b: String = "OK" var A.c: String - [platformStatic]get() = "OK" - [platformStatic]set(t: String) {} + @platformStatic get() = "OK" + @platformStatic set(t: String) {} } diff --git a/compiler/testData/compileJavaAgainstKotlin/property/platformName/PlatformName.kt b/compiler/testData/compileJavaAgainstKotlin/property/platformName/PlatformName.kt index edca82e6f8f..26d8d9e1441 100644 --- a/compiler/testData/compileJavaAgainstKotlin/property/platformName/PlatformName.kt +++ b/compiler/testData/compileJavaAgainstKotlin/property/platformName/PlatformName.kt @@ -3,7 +3,7 @@ package test import kotlin.platform.* var v: Int = 1 - [platformName("vget")] + @platformName("vget") get - [platformName("vset")] + @platformName("vset") set diff --git a/compiler/testData/compileKotlinAgainstKotlin/InlinedConstants.A.kt b/compiler/testData/compileKotlinAgainstKotlin/InlinedConstants.A.kt index 6e624ae137e..35e5e84c913 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/InlinedConstants.A.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/InlinedConstants.A.kt @@ -14,5 +14,5 @@ public val c: Char = '\u03c0' // pi symbol public val str: String = ":)" -[Retention(RetentionPolicy.RUNTIME)] +@Retention(RetentionPolicy.RUNTIME) public annotation class AnnotationClass(public val value: String) \ No newline at end of file diff --git a/compiler/testData/compileKotlinAgainstKotlin/PlatformNames.A.kt b/compiler/testData/compileKotlinAgainstKotlin/PlatformNames.A.kt index 5e837c66373..bff0200f855 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/PlatformNames.A.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/PlatformNames.A.kt @@ -2,11 +2,11 @@ package lib import kotlin.platform.* -[platformName("bar")] +@platformName("bar") fun foo() = "foo" var v: Int = 1 - [platformName("vget")] + @platformName("vget") get - [platformName("vset")] + @platformName("vset") set diff --git a/compiler/testData/diagnostics/tests/resolve/resolveAnnotatedLambdaArgument.kt b/compiler/testData/diagnostics/tests/resolve/resolveAnnotatedLambdaArgument.kt index 1cef44cfccd..2425a866945 100644 --- a/compiler/testData/diagnostics/tests/resolve/resolveAnnotatedLambdaArgument.kt +++ b/compiler/testData/diagnostics/tests/resolve/resolveAnnotatedLambdaArgument.kt @@ -1,9 +1,9 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATED_ANNOTATION_SYNTAX +// !DIAGNOSTICS: -UNUSED_PARAMETER annotation class Ann fun bar(block: (T) -> Int) {} fun foo() { - bar @Ann [Ann] { x -> x } - bar @Ann [Ann] label@{ x -> x } + bar @Ann @[Ann] { x -> x } + bar @Ann @[Ann] label@{ x -> x } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt b/compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt index ff58c206d3e..2085b69d79f 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt @@ -1,4 +1,4 @@ package test -[AnnotatedAnnotation] +@[AnnotatedAnnotation] public annotation class AnnotatedAnnotation diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt index 229529a45a2..2fd4f6beab7 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt @@ -4,6 +4,6 @@ annotation class Anno class Class { companion object { - [Anno] var property: Int = 42 + @[Anno] var property: Int = 42 } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.kt index 2a75d6d303b..a254bcd98b8 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.kt @@ -3,4 +3,4 @@ package test annotation class Anno(val value: String) -class Constructor [Anno(value = "string")]() +class Constructor @Anno(value = "string") constructor() diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt index 987b393af91..f1c5412c57f 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt @@ -4,5 +4,5 @@ annotation class Anno class Class { val property: Int - [Anno] get() = 42 + @[Anno] get() = 42 } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt index 6fd5d0f8cdb..cdf05c2a932 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt @@ -3,5 +3,5 @@ package test annotation class Anno class Class { - [Anno] var property: Int = 42 + @[Anno] var property: Int = 42 } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt index 3a35df41b5b..bc71323080d 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt @@ -4,5 +4,5 @@ annotation class Anno class Class { var property: Int = 42 - [Anno] set(value) { } + @[Anno] set(value) { } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt index 2f99ac42132..a3c874f2c8d 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt @@ -3,4 +3,4 @@ package test annotation class Anno val property: Int - [Anno] get() = 42 + @[Anno] get() = 42 diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt index 7f822db3f1e..065c669519f 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt @@ -2,4 +2,4 @@ package test annotation class Anno -[Anno] var property: Int = 42 +@[Anno] var property: Int = 42 diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt index 8ffec5b995f..02b8f103f76 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt @@ -3,4 +3,4 @@ package test annotation class Anno var property: Int = 42 - [Anno] set(value) { } + @[Anno] set(value) { } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt index b0e0bfdc60b..1f60d16268d 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt @@ -3,4 +3,4 @@ package test annotation class A annotation class B -class Class([A] val x: Int, [B] y: String) +class Class(@[A] val x: Int, @[B] y: String) diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt index 12d28c6f6f7..89838ce0992 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt @@ -3,4 +3,4 @@ package test annotation class A annotation class B -enum class E([A] val x: String, [B] val y: Int) +enum class E(@[A] val x: String, @[B] val y: Int) diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt index 232d2ea0e2e..33c4e896ce8 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt @@ -2,4 +2,4 @@ package test annotation class A -fun Int.foo([A] x: Int) {} +fun Int.foo(@[A] x: Int) {} diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt index 364d5d0a67c..e4e9426a138 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt @@ -4,5 +4,5 @@ package test annotation class Anno class Class { - fun String.foo([Anno] x: Int) = 42 + fun String.foo(@[Anno] x: Int) = 42 } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt index 7f29456f346..3754fea7c65 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt @@ -5,5 +5,5 @@ annotation class A class Class { var Int.foo: Int get() = this - set([A] value) {} + set(@[A] value) {} } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt index 8b203adbe97..87b7480b34e 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt @@ -3,5 +3,5 @@ package test annotation class Anno class Class { - fun foo([Anno] x: String) {} + fun foo(@[Anno] x: String) {} } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt index 53410070168..e49bba4ff96 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt @@ -4,5 +4,5 @@ package test annotation class Anno interface Trait { - fun foo([Anno] x: String) = 42 + fun foo(@[Anno] x: String) = 42 } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.kt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.kt index 0b96e11ed56..37d61b52069 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.kt @@ -4,7 +4,7 @@ package test annotation class A(val s: String) class Outer { - class Nested([A("nested")] val x: String) + class Nested(@[A("nested")] val x: String) - inner class Inner([A("inner")] val y: String) + inner class Inner(@[A("inner")] val y: String) } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt index 8c66ee274ac..73a6292f7bf 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt @@ -5,6 +5,6 @@ annotation class B annotation class C annotation class D -fun foo([A B] x: Int, [A C] y: Double, [B C D] z: String) {} +fun foo(@[A B] x: Int, @[A C] y: Double, @[B C D] z: String) {} -fun bar([A B C D] x: Int) {} +fun bar(@[A B C D] x: Int) {} diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt index e58450573c0..3b7074fc5fe 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt @@ -5,5 +5,5 @@ annotation class A class Class { var foo: Int get() = 42 - set([A] value) {} + set(@[A] value) {} } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt index 88763bbb386..4a72c92a506 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt @@ -2,4 +2,4 @@ package test annotation class Anno -fun foo([Anno] x: Int) {} +fun foo(@[Anno] x: Int) {} diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt index b95a94d9178..13c8dbb259f 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt @@ -5,4 +5,4 @@ annotation class B var foo: Int get() = 42 - set([A B] value) {} + set(@[A B] value) {} diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt index 1f8ba0cc075..7f0bfd955a2 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt @@ -3,6 +3,6 @@ package test annotation class Anno class Class { - [Anno] val property: Int + @[Anno] val property: Int get() = 42 } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt index f98ddfe0b21..0580196a0cc 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt @@ -4,7 +4,7 @@ annotation class Anno class Class { companion object { - [Anno] val property: Int + @[Anno] val property: Int get() = 42 } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt index 49d1174efaa..d64c6e36ce4 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt @@ -5,12 +5,12 @@ annotation class StringAnno annotation class DoubleAnno class Class { - [IntAnno] val Int.extension: Int + @[IntAnno] val Int.extension: Int get() = this - [StringAnno] val String.extension: String + @[StringAnno] val String.extension: String get() = this - [DoubleAnno] val Double.extension: Int + @[DoubleAnno] val Double.extension: Int get() = 42 } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt index aa994c1847a..2aab6611392 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt @@ -4,11 +4,11 @@ annotation class IntAnno annotation class StringAnno annotation class DoubleAnno -[IntAnno] val Int.extension: Int +@[IntAnno] val Int.extension: Int get() = this -[StringAnno] val String.extension: String +@[StringAnno] val String.extension: String get() = this -[DoubleAnno] val Double.extension: Int +@[DoubleAnno] val Double.extension: Int get() = 42 diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt index f0b91434720..694a37f83a4 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt @@ -4,6 +4,6 @@ annotation class Anno class Class { interface Trait { - [Anno] val property: Int + @[Anno] val property: Int } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt index dcd02fd78d2..c45ce99f161 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt @@ -2,5 +2,5 @@ package test annotation class Anno -[Anno] val property: Int +@[Anno] val property: Int get() = 42 diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt index 5d238dffc50..f67ce9b2c8f 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt @@ -3,5 +3,5 @@ package test annotation class Anno interface Trait { - [Anno] val property: Int + @[Anno] val property: Int } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt index 2a4491fcca5..a0e726f1faa 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt @@ -4,7 +4,7 @@ annotation class Anno interface Trait { companion object { - [Anno] val property: Int + @[Anno] val property: Int get() = 42 } } diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.kt b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.kt index 5f4be2a404d..a8c90f77529 100644 --- a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.kt +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.kt @@ -5,9 +5,9 @@ import org.jetbrains.annotations.* public interface LoadIterable { Mutable public fun getIterable(): MutableIterable? - public fun setIterable([Mutable] p0: MutableIterable?) + public fun setIterable(@Mutable p0: MutableIterable?) ReadOnly public fun getReadOnlyIterable(): Iterable? - public fun setReadOnlyIterable([ReadOnly] p0: Iterable?) + public fun setReadOnlyIterable(@ReadOnly p0: Iterable?) } diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithConflict.kt b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithConflict.kt index 692c6979b8d..1253c24bf13 100644 --- a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithConflict.kt +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithConflict.kt @@ -3,7 +3,7 @@ package test import org.jetbrains.annotations.* public interface LoadIterableWithConflict { - [ReadOnly] [Mutable] + @ReadOnly @Mutable public fun getIterable(): MutableIterable? - public fun setIterable([ReadOnly] [Mutable] p0: MutableIterable?) + public fun setIterable(@ReadOnly @Mutable p0: MutableIterable?) } diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.kt b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.kt index 2a8f4828924..0eb890d2980 100644 --- a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.kt +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.kt @@ -5,9 +5,9 @@ import org.jetbrains.annotations.* public interface LoadIterableWithNullability { Mutable public fun getIterable(): MutableIterable - public fun setIterable([Mutable] p0: MutableIterable) + public fun setIterable(@Mutable p0: MutableIterable) ReadOnly public fun getReadOnlyIterable(): Iterable - public fun setReadOnlyIterable([ReadOnly] p0: 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 48ec8e1d2ce..0900376775a 100644 --- a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.kt +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.kt @@ -7,11 +7,11 @@ public interface LoadIterableWithPropagation { public interface LoadIterable { Mutable public fun getIterable(): MutableIterable? - public fun setIterable([Mutable] p0: MutableIterable?) + public fun setIterable(@Mutable p0: MutableIterable?) ReadOnly public fun getReadOnlyIterable(): Iterable? - public fun setReadOnlyIterable([ReadOnly] p0: Iterable?) + public fun setReadOnlyIterable(@ReadOnly p0: Iterable?) } public open class LoadIterableImpl : LoadIterable { diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames/functionName.kt b/compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames/functionName.kt index 448399092c3..eeda69b8b20 100644 --- a/compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames/functionName.kt +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames/functionName.kt @@ -4,15 +4,15 @@ import kotlin.platform.* annotation class A(val s: String) -[platformName("bar")] +@platformName("bar") A("1") fun foo() = "foo" A("2") var v: Int = 1 - [platformName("vget")] - [A("3")] + @platformName("vget") + @A("3") get - [platformName("vset")] - [A("4")] + @platformName("vset") + @A("4") set diff --git a/compiler/testData/renderer/Classes.kt b/compiler/testData/renderer/Classes.kt index 2454a506dc8..31df8ff1a43 100644 --- a/compiler/testData/renderer/Classes.kt +++ b/compiler/testData/renderer/Classes.kt @@ -3,8 +3,8 @@ package rendererTest annotation class TheAnnotation annotation class AnotherAnnotation -[TheAnnotation] -public open class TheClass [AnotherAnnotation] () { +@TheAnnotation +public open class TheClass @AnotherAnnotation constructor() { private val privateVal: Int = 5 val shouldBeFinal: Int = 5 @@ -14,7 +14,7 @@ public open class TheClass [AnotherAnnotation] () { protected abstract fun foo() {} - [TheAnnotation] private constructor() + @TheAnnotation private constructor() private class Inner {} } diff --git a/compiler/testData/renderer/FunctionTypes.kt b/compiler/testData/renderer/FunctionTypes.kt index 631db4cbbcc..832df262d39 100644 --- a/compiler/testData/renderer/FunctionTypes.kt +++ b/compiler/testData/renderer/FunctionTypes.kt @@ -5,18 +5,18 @@ var v4: Function1 var v4: (() -> Int, (String) -> Unit) -> String var v5: Int.() -> Int var v6 : Int.(String, Int) -> Unit -var v7 : [extension] Function2 +var v7 : @extension Function2 class F: Function0 var v8: F -class EF: [extension] Function1 +class EF: @extension Function1 var v9: EF class GF: Function0 var v10: GF -class GEF: [extension] Function1 +class GEF: @extension Function1 var v11: GEF //internal var v1: () -> kotlin.Unit defined in root package diff --git a/compiler/testData/repl/regressions/kt6843.repl b/compiler/testData/repl/regressions/kt6843.repl index ea547a0cb76..19441dc6048 100644 --- a/compiler/testData/repl/regressions/kt6843.repl +++ b/compiler/testData/repl/regressions/kt6843.repl @@ -1,4 +1,4 @@ ->>> [data] class Person(val name: String) +>>> @[data] class Person(val name: String) >>> var x: String? = "hello" >>> val y = x?.let { Person(it) } >>> y diff --git a/compiler/testData/resolve/DefaultParamsOfLocalFunctions.resolve b/compiler/testData/resolve/DefaultParamsOfLocalFunctions.resolve index 88a1eeee94f..70b4be2390c 100644 --- a/compiler/testData/resolve/DefaultParamsOfLocalFunctions.resolve +++ b/compiler/testData/resolve/DefaultParamsOfLocalFunctions.resolve @@ -10,7 +10,7 @@ package m fun test() { ~x~val x = 2 - [`zzz`zzz] fun local( + @[`zzz`zzz] fun local( `zzz`zzz i: Int = `x`x, j: Int = 3, s: String = "$`x`x", diff --git a/compiler/testData/resolveAnnotations/testFile.kt b/compiler/testData/resolveAnnotations/testFile.kt index 403123fd60b..ee98e4e0d4c 100644 --- a/compiler/testData/resolveAnnotations/testFile.kt +++ b/compiler/testData/resolveAnnotations/testFile.kt @@ -1,24 +1,24 @@ -[file: ANNOTATION] +@file:ANNOTATION package test import test.MyEnum.* -ANNOTATION class MyClass [ANNOTATION]([ANNOTATION] param: Int, [ANNOTATION] val consProp: Int) { +ANNOTATION class MyClass @ANNOTATION constructor(@ANNOTATION param: Int, @ANNOTATION val consProp: Int) { ANNOTATION companion object { } ANNOTATION var prop: Int = 1 - [ANNOTATION] get - [ANNOTATION] set([ANNOTATION] param) = $prop = param - ANNOTATION fun foo([ANNOTATION] param: Int) { - [ANNOTATION] class LocalClass { } + @ANNOTATION get + @ANNOTATION set(@ANNOTATION param) = $prop = param + ANNOTATION fun foo(@ANNOTATION param: Int) { + @ANNOTATION class LocalClass { } - [ANNOTATION] object LocalObject { } + @ANNOTATION object LocalObject { } - [ANNOTATION] fun localFun() {} + @ANNOTATION fun localFun() {} - [ANNOTATION] var localVar: Int = 1 + @ANNOTATION var localVar: Int = 1 } ANNOTATION class InnerClass { @@ -30,13 +30,13 @@ ANNOTATION object MyObject { } ANNOTATION var topProp: Int = 1 - [ANNOTATION] get - [ANNOTATION] set([ANNOTATION] param) = $topProp = param + @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 } +val funLiteral = {(@ANNOTATION a: Int) -> a } annotation class AnnString(a: String) diff --git a/compiler/testData/serialization/builtinsSerializer/annotationTargets.kt b/compiler/testData/serialization/builtinsSerializer/annotationTargets.kt index 48c1245967f..b8fc0759edc 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationTargets.kt +++ b/compiler/testData/serialization/builtinsSerializer/annotationTargets.kt @@ -16,7 +16,7 @@ anno("extension property") val Double.p2: Double get() = null anno("top level class") -class C1 [anno("constructor")] () { +class C1 @anno("constructor") constructor() { anno("member function") fun f3(anno("member function parameter") p: Int) {} diff --git a/compiler/testData/serialization/local/annotationsInLocalClass.kt b/compiler/testData/serialization/local/annotationsInLocalClass.kt index 18883f85d7c..4844453be76 100644 --- a/compiler/testData/serialization/local/annotationsInLocalClass.kt +++ b/compiler/testData/serialization/local/annotationsInLocalClass.kt @@ -4,7 +4,7 @@ class A { annotation class Ann(val info: String) fun foo() { - [Ann("class")] class Local { + @Ann("class") class Local { Ann("fun") fun foo(): Local = this Ann("val") val x = foo() diff --git a/compiler/testData/writeFlags/function/deprecatedFlag/emptyGetter.kt b/compiler/testData/writeFlags/function/deprecatedFlag/emptyGetter.kt index f7fd347109f..f8e4bd15934 100644 --- a/compiler/testData/writeFlags/function/deprecatedFlag/emptyGetter.kt +++ b/compiler/testData/writeFlags/function/deprecatedFlag/emptyGetter.kt @@ -1,6 +1,6 @@ class MyClass() { val test = "" - [deprecated("")] get + @deprecated("") get } // TESTED_OBJECT_KIND: function diff --git a/compiler/testData/writeFlags/function/deprecatedFlag/emptySetter.kt b/compiler/testData/writeFlags/function/deprecatedFlag/emptySetter.kt index c6f48c26895..06a4c8310d2 100644 --- a/compiler/testData/writeFlags/function/deprecatedFlag/emptySetter.kt +++ b/compiler/testData/writeFlags/function/deprecatedFlag/emptySetter.kt @@ -1,6 +1,6 @@ class MyClass() { var test = "" - [deprecated("")] set + @deprecated("") set } // TESTED_OBJECT_KIND: function diff --git a/compiler/testData/writeFlags/function/deprecatedFlag/getter.kt b/compiler/testData/writeFlags/function/deprecatedFlag/getter.kt index 7cbc220259c..247da3cd11b 100644 --- a/compiler/testData/writeFlags/function/deprecatedFlag/getter.kt +++ b/compiler/testData/writeFlags/function/deprecatedFlag/getter.kt @@ -1,6 +1,6 @@ class MyClass() { val test: Int - [deprecated("")] get(): Int { return 0 } + @deprecated("") get(): Int { return 0 } } diff --git a/compiler/testData/writeFlags/function/deprecatedFlag/setter.kt b/compiler/testData/writeFlags/function/deprecatedFlag/setter.kt index efdc253d531..bf7056622c7 100644 --- a/compiler/testData/writeFlags/function/deprecatedFlag/setter.kt +++ b/compiler/testData/writeFlags/function/deprecatedFlag/setter.kt @@ -1,6 +1,6 @@ class MyClass() { var test = 1 - [deprecated("")] set(i: Int) { test = i } + @deprecated("") set(i: Int) { test = i } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/AnnotationGenTest.java b/compiler/tests/org/jetbrains/kotlin/codegen/AnnotationGenTest.java index 07f2c28345a..0cb84cf2e53 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/AnnotationGenTest.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/AnnotationGenTest.java @@ -54,7 +54,7 @@ public class AnnotationGenTest extends CodegenTestCase { } public void testPropField() throws Exception { - ClassLoader loader = loadFileGetClassLoader("[Deprecated] var x = 0"); + ClassLoader loader = loadFileGetClassLoader("@[Deprecated] var x = 0"); Class packageClass = getPackageClass(loader); assertNull(packageClass.getDeclaredMethod("getX").getAnnotation(Deprecated.class)); assertNull(packageClass.getDeclaredMethod("setX", int.class).getAnnotation(Deprecated.class)); @@ -66,7 +66,7 @@ public class AnnotationGenTest extends CodegenTestCase { public void testPropGetter() throws Exception { ClassLoader loader = loadFileGetClassLoader("var x = 0\n" + - "[Deprecated] get"); + "@[Deprecated] get"); Class packageClass = getPackageClass(loader); assertNotNull(packageClass.getDeclaredMethod("getX").getAnnotation(Deprecated.class)); assertNull(packageClass.getDeclaredMethod("setX", int.class).getAnnotation(Deprecated.class)); @@ -78,7 +78,7 @@ public class AnnotationGenTest extends CodegenTestCase { public void testPropSetter() throws Exception { ClassLoader loader = loadFileGetClassLoader("var x = 0\n" + - "[Deprecated] set"); + "@[Deprecated] set"); Class packageClass = getPackageClass(loader); assertNull(packageClass.getDeclaredMethod("getX").getAnnotation(Deprecated.class)); assertNotNull(packageClass.getDeclaredMethod("setX", int.class).getAnnotation(Deprecated.class)); @@ -89,7 +89,7 @@ public class AnnotationGenTest extends CodegenTestCase { } public void testAnnotationForParamInTopLevelFunction() throws Exception { - ClassLoader loader = loadFileGetClassLoader("fun x([Deprecated] i: Int) {}"); + ClassLoader loader = loadFileGetClassLoader("fun x(@[Deprecated] i: Int) {}"); Class packageClass = getPackageClass(loader); Method packageClassMethod = packageClass.getMethod("x", int.class); assertNotNull(packageClassMethod); @@ -101,7 +101,7 @@ public class AnnotationGenTest extends CodegenTestCase { } public void testAnnotationForParamInInstanceFunction() throws NoSuchFieldException, NoSuchMethodException { - loadText("class A() { fun x([Deprecated] i: Int) {}}"); + loadText("class A() { fun x(@[Deprecated] i: Int) {}}"); Class aClass = generateClass("A"); Method x = aClass.getMethod("x", int.class); assertNotNull(x); @@ -111,7 +111,7 @@ public class AnnotationGenTest extends CodegenTestCase { } public void testAnnotationForParamInInstanceExtensionFunction() throws NoSuchFieldException, NoSuchMethodException { - loadText("class A() { fun String.x([Deprecated] i: Int) {}}"); + loadText("class A() { fun String.x(@[Deprecated] i: Int) {}}"); Class aClass = generateClass("A"); Method x = aClass.getMethod("x", String.class, int.class); assertNotNull(x); @@ -121,7 +121,7 @@ public class AnnotationGenTest extends CodegenTestCase { } public void testParamInConstructor() throws NoSuchFieldException, NoSuchMethodException { - loadText("class A ([Deprecated] x: Int) {}"); + loadText("class A (@[Deprecated] x: Int) {}"); Class aClass = generateClass("A"); Constructor constructor = aClass.getDeclaredConstructor(int.class); assertNotNull(constructor); @@ -131,7 +131,7 @@ public class AnnotationGenTest extends CodegenTestCase { } public void testParamInEnumConstructor() throws NoSuchFieldException, NoSuchMethodException { - loadText("enum class E([Deprecated] p: String)"); + loadText("enum class E(@[Deprecated] p: String)"); Class klass = generateClass("E"); Constructor constructor = klass.getDeclaredConstructor(String.class, int.class, String.class); assertNotNull(constructor); @@ -141,7 +141,7 @@ public class AnnotationGenTest extends CodegenTestCase { } public void testParamInInnerConstructor() throws NoSuchFieldException, NoSuchMethodException { - loadText("class Outer { inner class Inner([Deprecated] x: Int) }"); + loadText("class Outer { inner class Inner(@[Deprecated] x: Int) }"); Class outer = generateClass("Outer"); Class inner = outer.getDeclaredClasses()[0]; Constructor constructor = inner.getDeclaredConstructor(outer, int.class); @@ -152,7 +152,7 @@ public class AnnotationGenTest extends CodegenTestCase { } public void testPropFieldInConstructor() throws NoSuchFieldException, NoSuchMethodException { - loadText("class A ([Deprecated] var x: Int) {}"); + loadText("class A (@[Deprecated] var x: Int) {}"); Class aClass = generateClass("A"); Constructor constructor = aClass.getDeclaredConstructor(int.class); assertNotNull(constructor); @@ -199,7 +199,7 @@ public class AnnotationGenTest extends CodegenTestCase { } public void testConstructor() throws NoSuchFieldException, NoSuchMethodException { - loadText("class A [Deprecated] () {}"); + loadText("class A @[Deprecated] () {}"); Class aClass = generateClass("A"); Constructor x = aClass.getDeclaredConstructor(); Deprecated annotation = (Deprecated) x.getAnnotation(Deprecated.class); @@ -207,7 +207,7 @@ public class AnnotationGenTest extends CodegenTestCase { } public void testMethod() throws Exception { - ClassLoader loader = loadFileGetClassLoader("[Deprecated] fun x () {}"); + ClassLoader loader = loadFileGetClassLoader("@[Deprecated] fun x () {}"); Class packageClass = getPackageClass(loader); Method packageClassMethod = packageClass.getDeclaredMethod("x"); @@ -220,7 +220,7 @@ public class AnnotationGenTest extends CodegenTestCase { } public void testClass() throws NoSuchFieldException, NoSuchMethodException { - loadText("[Deprecated] class A () {}"); + loadText("@[Deprecated] class A () {}"); Class aClass = generateClass("A"); Deprecated annotation = (Deprecated) aClass.getAnnotation(Deprecated.class); assertNotNull(annotation); diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvmRuntimeDescriptorLoaderTest.kt b/compiler/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvmRuntimeDescriptorLoaderTest.kt index 44919264fed..70fe2d95140 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvmRuntimeDescriptorLoaderTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvmRuntimeDescriptorLoaderTest.kt @@ -168,7 +168,7 @@ public abstract class AbstractJvmRuntimeDescriptorLoaderTest : TestCaseWithTmpdi private fun addRuntimeRetentionToKotlinSource(text: String): String { return text.replace( "annotation class", - "[java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)] annotation class" + "@[java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)] annotation class" ) } diff --git a/idea/idea-completion/testData/basic/common/annotations/FunctionAnnotation2.kt b/idea/idea-completion/testData/basic/common/annotations/FunctionAnnotation2.kt index 639f9f1f048..ffa7b6b9912 100644 --- a/idea/idea-completion/testData/basic/common/annotations/FunctionAnnotation2.kt +++ b/idea/idea-completion/testData/basic/common/annotations/FunctionAnnotation2.kt @@ -1,7 +1,7 @@ annotation class Hello val v = 1 -[] fun some() {} +@[] fun some() {} // INVOCATION_COUNT: 0 // EXIST: Hello diff --git a/idea/idea-completion/testData/basic/common/annotations/NoParameterAnnotationAutoPopup2.kt b/idea/idea-completion/testData/basic/common/annotations/NoParameterAnnotationAutoPopup2.kt index a861e7fb97f..7453355e09a 100644 --- a/idea/idea-completion/testData/basic/common/annotations/NoParameterAnnotationAutoPopup2.kt +++ b/idea/idea-completion/testData/basic/common/annotations/NoParameterAnnotationAutoPopup2.kt @@ -1,4 +1,4 @@ -fun foo([inlineOptions] i) { } +fun foo(@inlineOptions i) { } // INVOCATION_COUNT: 0 // NUMBER: 0 diff --git a/idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation8.kt b/idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation8.kt index c3e5c96d7aa..cb84d6d403c 100644 --- a/idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation8.kt +++ b/idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation8.kt @@ -1,7 +1,7 @@ annotation class Hello val v = 1 -fun foo([) { } +fun foo(@[) { } // INVOCATION_COUNT: 1 // EXIST: Hello diff --git a/idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation9.kt b/idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation9.kt index 64b9118d576..7d306d6ef8d 100644 --- a/idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation9.kt +++ b/idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation9.kt @@ -1,7 +1,7 @@ annotation class iHello val v = 1 -fun foo([i) { } +fun foo(@[i) { } // INVOCATION_COUNT: 1 // EXIST: iHello diff --git a/idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationAutoPopup1.kt b/idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationAutoPopup1.kt index dd539b132a8..ebe1604f908 100644 --- a/idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationAutoPopup1.kt +++ b/idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationAutoPopup1.kt @@ -1,6 +1,6 @@ val v = 1 -fun foo([i) { } +fun foo(@[i) { } // INVOCATION_COUNT: 0 // EXIST: inlineOptions diff --git a/idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationAutoPopup2.kt b/idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationAutoPopup2.kt index a7b6a5450a9..4cff55de9f1 100644 --- a/idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationAutoPopup2.kt +++ b/idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationAutoPopup2.kt @@ -1,6 +1,6 @@ val v = 1 -fun foo([volatile i) { } +fun foo(@[volatile i) { } // INVOCATION_COUNT: 0 // EXIST: inlineOptions diff --git a/idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation2.kt b/idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation2.kt index d49a98f5c40..12bf0129685 100644 --- a/idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation2.kt +++ b/idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation2.kt @@ -1,7 +1,7 @@ annotation class Hello val v = 1 -[] +@[] // INVOCATION_COUNT: 0 // EXIST: Hello diff --git a/idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation4.kt b/idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation4.kt index 16ecf965813..d202f78c302 100644 --- a/idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation4.kt +++ b/idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation4.kt @@ -1,7 +1,7 @@ annotation class Hello val v = 1 -[] +@[] class C // INVOCATION_COUNT: 0 diff --git a/idea/testData/copyPaste/conversion/AddImportsClassInSamePackage.dependency.kt b/idea/testData/copyPaste/conversion/AddImportsClassInSamePackage.dependency.kt index 2e610815a3a..c5df11fc1e2 100644 --- a/idea/testData/copyPaste/conversion/AddImportsClassInSamePackage.dependency.kt +++ b/idea/testData/copyPaste/conversion/AddImportsClassInSamePackage.dependency.kt @@ -3,6 +3,6 @@ package ppp import kotlin.platform.platformStatic public object Dependency { - [platformStatic] + @platformStatic public val FIELD: Int = 1 } \ No newline at end of file diff --git a/idea/testData/debugger/smartStepInto/annotation.kt b/idea/testData/debugger/smartStepInto/annotation.kt index 1ad6b6aa118..ff1ec7a0abf 100644 --- a/idea/testData/debugger/smartStepInto/annotation.kt +++ b/idea/testData/debugger/smartStepInto/annotation.kt @@ -1,5 +1,5 @@ fun foo() { - [Ann() Ann] val a = bar() + @Ann() @Ann val a = bar() } annotation class Ann diff --git a/idea/testData/decompiler/decompiledText/Annotations/Annotations.kt b/idea/testData/decompiler/decompiledText/Annotations/Annotations.kt index d9938eb6c83..57523821f22 100644 --- a/idea/testData/decompiler/decompiledText/Annotations/Annotations.kt +++ b/idea/testData/decompiler/decompiledText/Annotations/Annotations.kt @@ -4,8 +4,8 @@ import dependency.* 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/AnnotationsOnPrimaryCtr/AnnotationsOnPrimaryCtr.kt b/idea/testData/decompiler/decompiledText/AnnotationsOnPrimaryCtr/AnnotationsOnPrimaryCtr.kt index 123cac429dd..2802e9156d5 100644 --- a/idea/testData/decompiler/decompiledText/AnnotationsOnPrimaryCtr/AnnotationsOnPrimaryCtr.kt +++ b/idea/testData/decompiler/decompiledText/AnnotationsOnPrimaryCtr/AnnotationsOnPrimaryCtr.kt @@ -2,4 +2,4 @@ package test import dependency.* -class AnnotationsOnPrimaryCtr [A("a")] private [B(1) C] () +class AnnotationsOnPrimaryCtr @A("a") private @B(1) @C constructor() diff --git a/idea/testData/decompiler/stubBuilder/Annotations/Annotations.kt b/idea/testData/decompiler/stubBuilder/Annotations/Annotations.kt index f1b83673ec3..30ca8428164 100644 --- a/idea/testData/decompiler/stubBuilder/Annotations/Annotations.kt +++ b/idea/testData/decompiler/stubBuilder/Annotations/Annotations.kt @@ -1,4 +1,4 @@ -a public class Annotations private [a] (private [a] val c1: Int, [a] val c2: Int) { +a public class Annotations private @a constructor(private @a val c1: Int, @a val c2: Int) { protected a fun f() { } @@ -7,22 +7,22 @@ a public class Annotations private [a] (private [a] val c1: Int, [a] val c2: Int 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 //TODO: accessor modifiers are lost - [a] get - [a] private set + @a get + @a private set private b(E.E2) companion object { } - class Nested [a] private [b(E.E1) b(E.E2)] () + class Nested @a private @b(E.E1) @b(E.E2) constructor() - fun types(param: [a] [b(E.E1)] DoubleRange): [a] [b(E.E2)] Unit {} + fun types(param: @a @b(E.E1) DoubleRange): @a @b(E.E2) Unit {} } annotation class a diff --git a/idea/testData/decompiler/stubBuilder/TopLevelMembersAnnotatedPackage/topLevelMembersAnnotated.kt b/idea/testData/decompiler/stubBuilder/TopLevelMembersAnnotatedPackage/topLevelMembersAnnotated.kt index 5d7f830561a..c6270d4460f 100644 --- a/idea/testData/decompiler/stubBuilder/TopLevelMembersAnnotatedPackage/topLevelMembersAnnotated.kt +++ b/idea/testData/decompiler/stubBuilder/TopLevelMembersAnnotatedPackage/topLevelMembersAnnotated.kt @@ -4,7 +4,7 @@ import d.e.f.* a 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/formatter/PrimaryConstructor.after.kt b/idea/testData/formatter/PrimaryConstructor.after.kt index c0e6d5542c2..47aeb1899b3 100644 --- a/idea/testData/formatter/PrimaryConstructor.after.kt +++ b/idea/testData/formatter/PrimaryConstructor.after.kt @@ -1,12 +1,12 @@ class A1() class A2 private () -class A3 private [ann] protected () -class A4 private [ann1] protected [ann2] () { +class A3 private @[ann] protected constructor() +class A4 private @ann1 protected @[ann2] constructor() { } -class A5 private [ann] +class A5 private @ann constructor () @@ -14,17 +14,17 @@ class A6 /* faddf */ private () class A7 private -[ann] +@ann constructor () class A8 // eol comment private -[ann] +@ann constructor () class A9 // eol comment private // eol comment -[ann] // eol comment +@ann constructor// eol comment () class A10 diff --git a/idea/testData/formatter/PrimaryConstructor.kt b/idea/testData/formatter/PrimaryConstructor.kt index c66d9642cf7..1101b19864c 100644 --- a/idea/testData/formatter/PrimaryConstructor.kt +++ b/idea/testData/formatter/PrimaryConstructor.kt @@ -1,11 +1,11 @@ class A1 () class A2 private () -class A3 private [ann] protected() -class A4 private [ann1] protected [ann2] () { +class A3 private @[ann] protected constructor() +class A4 private @ann1 protected @[ann2] constructor() { } -class A5 private [ann] +class A5 private @ann constructor () @@ -13,17 +13,17 @@ class A6 /* faddf */ private () class A7 private -[ann] +@ann constructor () class A8 // eol comment private -[ann] +@ann constructor () class A9 // eol comment private // eol comment -[ann] // eol comment +@ann constructor// eol comment () class A10 diff --git a/idea/testData/formatter/SpacesInDeclarations.after.kt b/idea/testData/formatter/SpacesInDeclarations.after.kt index ab417040f92..2eb489b2a1d 100644 --- a/idea/testData/formatter/SpacesInDeclarations.after.kt +++ b/idea/testData/formatter/SpacesInDeclarations.after.kt @@ -64,21 +64,21 @@ annotation class A1 annotation class A2 -private [A1 A2 A1] A1 A2 [A1 A2 A2] [A1] val fooProp1 = 1 +private @[A1 A2 A1] A1 A2 @[A1 A2 A2] @[A1] val fooProp1 = 1 -private [ +private @[ A1 -A2 A1] A1 A2 [A1 +A2 A1] A1 A2 @[A1 A2 A2 -] [A1] val fooProp1 = 1 +] @[A1] val fooProp1 = 1 private A1 diff --git a/idea/testData/formatter/SpacesInDeclarations.kt b/idea/testData/formatter/SpacesInDeclarations.kt index a388ec526c7..083753fccc1 100644 --- a/idea/testData/formatter/SpacesInDeclarations.kt +++ b/idea/testData/formatter/SpacesInDeclarations.kt @@ -61,15 +61,15 @@ public var varWithAccessors2: Int annotation class A1 annotation class A2 -private [ A1 A2 A1 ] A1 A2 [ A1 A2 A2 ] [A1] val fooProp1 = 1 +private @[ A1 A2 A1 ] A1 A2 @[ A1 A2 A2 ] @[A1] val fooProp1 = 1 -private [ +private @[ A1 -A2 A1 ] A1 A2 [A1 +A2 A1 ] A1 A2 @[A1 A2 @@ -77,7 +77,7 @@ A2 A2 -] [A1] val fooProp1 = 1 +] @[A1] val fooProp1 = 1 private A1 diff --git a/idea/testData/formatter/modifierList/funAnnotationBeforeAnnotation.after.kt b/idea/testData/formatter/modifierList/funAnnotationBeforeAnnotation.after.kt index 0a60e51833a..66535cc4ce1 100644 --- a/idea/testData/formatter/modifierList/funAnnotationBeforeAnnotation.after.kt +++ b/idea/testData/formatter/modifierList/funAnnotationBeforeAnnotation.after.kt @@ -1,4 +1,4 @@ -[annot] -[foo] fun foo() { +@annot +@foo fun foo() { } diff --git a/idea/testData/formatter/modifierList/funAnnotationBeforeAnnotation.kt b/idea/testData/formatter/modifierList/funAnnotationBeforeAnnotation.kt index 0a60e51833a..66535cc4ce1 100644 --- a/idea/testData/formatter/modifierList/funAnnotationBeforeAnnotation.kt +++ b/idea/testData/formatter/modifierList/funAnnotationBeforeAnnotation.kt @@ -1,4 +1,4 @@ -[annot] -[foo] fun foo() { +@annot +@foo fun foo() { } diff --git a/idea/testData/formatter/modifierList/funAnnotationBeforeAnnotationEntry.after.kt b/idea/testData/formatter/modifierList/funAnnotationBeforeAnnotationEntry.after.kt index add13f9ffd9..4577ebb9806 100644 --- a/idea/testData/formatter/modifierList/funAnnotationBeforeAnnotationEntry.after.kt +++ b/idea/testData/formatter/modifierList/funAnnotationBeforeAnnotationEntry.after.kt @@ -1,4 +1,4 @@ -[annot] +@annot foo() fun foo() { } diff --git a/idea/testData/formatter/modifierList/funAnnotationBeforeAnnotationEntry.kt b/idea/testData/formatter/modifierList/funAnnotationBeforeAnnotationEntry.kt index add13f9ffd9..4577ebb9806 100644 --- a/idea/testData/formatter/modifierList/funAnnotationBeforeAnnotationEntry.kt +++ b/idea/testData/formatter/modifierList/funAnnotationBeforeAnnotationEntry.kt @@ -1,4 +1,4 @@ -[annot] +@annot foo() fun foo() { } diff --git a/idea/testData/formatter/modifierList/funAnnotationBeforeModifiers.after.kt b/idea/testData/formatter/modifierList/funAnnotationBeforeModifiers.after.kt index 200ed1f4b43..5732baa6abd 100644 --- a/idea/testData/formatter/modifierList/funAnnotationBeforeModifiers.after.kt +++ b/idea/testData/formatter/modifierList/funAnnotationBeforeModifiers.after.kt @@ -1,4 +1,4 @@ -[annot] +@annot final fun foo() { } diff --git a/idea/testData/formatter/modifierList/funAnnotationBeforeModifiers.kt b/idea/testData/formatter/modifierList/funAnnotationBeforeModifiers.kt index 200ed1f4b43..5732baa6abd 100644 --- a/idea/testData/formatter/modifierList/funAnnotationBeforeModifiers.kt +++ b/idea/testData/formatter/modifierList/funAnnotationBeforeModifiers.kt @@ -1,4 +1,4 @@ -[annot] +@annot final fun foo() { } diff --git a/idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotation.after.kt b/idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotation.after.kt index f4e508a93ca..d7a5afe840b 100644 --- a/idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotation.after.kt +++ b/idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotation.after.kt @@ -1,4 +1,4 @@ annot() -[foo] fun foo() { +@foo fun foo() { } diff --git a/idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotation.kt b/idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotation.kt index f4e508a93ca..d7a5afe840b 100644 --- a/idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotation.kt +++ b/idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotation.kt @@ -1,4 +1,4 @@ annot() -[foo] fun foo() { +@foo fun foo() { } diff --git a/idea/testData/formatter/modifierList/funModifierBeforeAnnotation.after.kt b/idea/testData/formatter/modifierList/funModifierBeforeAnnotation.after.kt index 456df3e9007..d20d2afc545 100644 --- a/idea/testData/formatter/modifierList/funModifierBeforeAnnotation.after.kt +++ b/idea/testData/formatter/modifierList/funModifierBeforeAnnotation.after.kt @@ -1,4 +1,4 @@ public -[foo] fun foo() { +@foo fun foo() { } diff --git a/idea/testData/formatter/modifierList/funModifierBeforeAnnotation.kt b/idea/testData/formatter/modifierList/funModifierBeforeAnnotation.kt index 456df3e9007..d20d2afc545 100644 --- a/idea/testData/formatter/modifierList/funModifierBeforeAnnotation.kt +++ b/idea/testData/formatter/modifierList/funModifierBeforeAnnotation.kt @@ -1,4 +1,4 @@ public -[foo] fun foo() { +@foo fun foo() { } diff --git a/idea/testData/joinLines/declarationAndAssignment/propertyWithAnnotation.kt b/idea/testData/joinLines/declarationAndAssignment/propertyWithAnnotation.kt index 9aae8e3085a..5e115d86683 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 d7babee1489..c3fb52a5802 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/quickfix/autoImports/falsePostfixOperator.before.Main.kt b/idea/testData/quickfix/autoImports/falsePostfixOperator.before.Main.kt index cdde5198289..1ddc48681d1 100644 --- a/idea/testData/quickfix/autoImports/falsePostfixOperator.before.Main.kt +++ b/idea/testData/quickfix/autoImports/falsePostfixOperator.before.Main.kt @@ -10,7 +10,7 @@ package h interface H -[suppress("UNUSED_CHANGED_VALUE")] +@suppress("UNUSED_CHANGED_VALUE") fun f(h: H?) { var h1 = h h1++ diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParamList.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParamList.kt index c1277ecd1af..cd6b088cf6e 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParamList.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParamList.kt @@ -1,5 +1,5 @@ // "Create annotation 'foo'" "true" -[foo] fun test() { +@[foo] fun test() { } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParamList.kt.after b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParamList.kt.after index 38aadd57eb9..4bbc13e2a60 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParamList.kt.after +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParamList.kt.after @@ -1,6 +1,6 @@ // "Create annotation 'foo'" "true" -[foo] fun test() { +@[foo] fun test() { } diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParams.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParams.kt index 42a2e331c9e..bac03a2791f 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParams.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParams.kt @@ -1,5 +1,5 @@ // "Create annotation 'foo'" "true" -[foo()] fun test() { +@[foo()] fun test() { } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParams.kt.after b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParams.kt.after index e6dbac4e158..4fcadc7e28d 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParams.kt.after +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParams.kt.after @@ -1,6 +1,6 @@ // "Create annotation 'foo'" "true" -[foo()] fun test() { +@[foo()] fun test() { } diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithParams.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithParams.kt index 92151baab13..b7af5e90727 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithParams.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithParams.kt @@ -1,5 +1,5 @@ // "Create annotation 'foo'" "true" -[foo(1, "2")] fun test() { +@[foo(1, "2")] fun test() { } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithParams.kt.after b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithParams.kt.after index 4f95727e553..1e95d920f86 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithParams.kt.after +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithParams.kt.after @@ -1,6 +1,6 @@ // "Create annotation 'foo'" "true" -[foo(1, "2")] fun test() { +@[foo(1, "2")] fun test() { } diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithTypeParams.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithTypeParams.kt index f7a46862d35..f9da59b755f 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithTypeParams.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithTypeParams.kt @@ -1,5 +1,5 @@ // "Create annotation 'foo'" "true" -[foo(1, "2")] fun test() { +@[foo(1, "2")] fun test() { } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithTypeParams.kt.after b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithTypeParams.kt.after index 4f95727e553..1e95d920f86 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithTypeParams.kt.after +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithTypeParams.kt.after @@ -1,6 +1,6 @@ // "Create annotation 'foo'" "true" -[foo(1, "2")] fun test() { +@[foo(1, "2")] fun test() { } diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleArgAnnotation.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleArgAnnotation.kt index 1d63b3fad28..1cca053960e 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleArgAnnotation.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleArgAnnotation.kt @@ -1,5 +1,5 @@ // "Create annotation 'foo'" "true" -[foo(1)] fun test() { +@[foo(1)] fun test() { } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleArgAnnotation.kt.after b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleArgAnnotation.kt.after index 4e08686987c..74412ceaac1 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleArgAnnotation.kt.after +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleArgAnnotation.kt.after @@ -1,6 +1,6 @@ // "Create annotation 'foo'" "true" -[foo(1)] fun test() { +@[foo(1)] fun test() { } diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleNamedArgAnnotation.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleNamedArgAnnotation.kt index aa4d2d9e7c7..b4d0ae46496 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleNamedArgAnnotation.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleNamedArgAnnotation.kt @@ -1,5 +1,5 @@ // "Create annotation 'foo'" "true" -[foo(fooBar = 1)] fun test() { +@[foo(fooBar = 1)] fun test() { } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleNamedArgAnnotation.kt.after b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleNamedArgAnnotation.kt.after index c28272b79d6..b09076dac90 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleNamedArgAnnotation.kt.after +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleNamedArgAnnotation.kt.after @@ -1,6 +1,6 @@ // "Create annotation 'foo'" "true" -[foo(fooBar = 1)] fun test() { +@[foo(fooBar = 1)] fun test() { } diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntry.kt b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntry.kt index afbed7f5f33..a84e2ed1256 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntry.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntry.kt @@ -1,6 +1,6 @@ // "Create annotation 'bar'" "true" // ERROR: Unresolved reference: foo -[foo(1, "2", bar("3", 4))] fun test() { +@[foo(1, "2", bar("3", 4))] fun test() { } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntry.kt.after b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntry.kt.after index 1c9a690ec3e..bf867efbbc2 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntry.kt.after +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntry.kt.after @@ -1,7 +1,7 @@ // "Create annotation 'bar'" "true" // ERROR: Unresolved reference: foo -[foo(1, "2", bar("3", 4))] fun test() { +@[foo(1, "2", bar("3", 4))] fun test() { } diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntryWithJavaQualifier.after.kt b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntryWithJavaQualifier.after.kt index 1810781f6e5..0d8d5e7d004 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntryWithJavaQualifier.after.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntryWithJavaQualifier.after.kt @@ -2,6 +2,6 @@ // ERROR: Unresolved reference: foo // ERROR: Unresolved reference: bar -[foo(1, "2", J.bar("3", 4))] fun test() { +@foo(1, "2", J.bar("3", 4)) fun test() { } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntryWithJavaQualifier.before.Main.kt b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntryWithJavaQualifier.before.Main.kt index 9ba0d85c100..7190a7bfe3d 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntryWithJavaQualifier.before.Main.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntryWithJavaQualifier.before.Main.kt @@ -2,6 +2,6 @@ // ERROR: Unresolved reference: foo // ERROR: Unresolved reference: bar -[foo(1, "2", J.bar("3", 4))] fun test() { +@foo(1, "2", J.bar("3", 4)) fun test() { } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithTypeArgsInAnnotationEntry.kt b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithTypeArgsInAnnotationEntry.kt index 5678173a0d5..f233e3b6901 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithTypeArgsInAnnotationEntry.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithTypeArgsInAnnotationEntry.kt @@ -1,6 +1,6 @@ // "Create annotation 'bar'" "true" // ERROR: Unresolved reference: foo -[foo(1, "2", bar("3", 4))] fun test() { +@[foo(1, "2", bar("3", 4))] fun test() { } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithTypeArgsInAnnotationEntry.kt.after b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithTypeArgsInAnnotationEntry.kt.after index 1c9a690ec3e..bf867efbbc2 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithTypeArgsInAnnotationEntry.kt.after +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithTypeArgsInAnnotationEntry.kt.after @@ -1,7 +1,7 @@ // "Create annotation 'bar'" "true" // ERROR: Unresolved reference: foo -[foo(1, "2", bar("3", 4))] fun test() { +@[foo(1, "2", bar("3", 4))] fun test() { } diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/singleArgCallInAnnotationEntry.kt b/idea/testData/quickfix/createFromUsage/createClass/callExpression/singleArgCallInAnnotationEntry.kt index 7a7a81c29ae..50cf088af63 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/singleArgCallInAnnotationEntry.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/singleArgCallInAnnotationEntry.kt @@ -1,6 +1,6 @@ // "Create annotation 'bar'" "true" // ERROR: Unresolved reference: foo -[foo(1, "2", bar("3"))] fun test() { +@[foo(1, "2", bar("3"))] fun test() { } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/singleArgCallInAnnotationEntry.kt.after b/idea/testData/quickfix/createFromUsage/createClass/callExpression/singleArgCallInAnnotationEntry.kt.after index b524465098e..3aa35a95545 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/singleArgCallInAnnotationEntry.kt.after +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/singleArgCallInAnnotationEntry.kt.after @@ -1,7 +1,7 @@ // "Create annotation 'bar'" "true" // ERROR: Unresolved reference: foo -[foo(1, "2", bar("3"))] fun test() { +@[foo(1, "2", bar("3"))] fun test() { } diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/singleNamedArgCallInAnnotationEntry.kt b/idea/testData/quickfix/createFromUsage/createClass/callExpression/singleNamedArgCallInAnnotationEntry.kt index d96881e9adf..eaed102b3f4 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/singleNamedArgCallInAnnotationEntry.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/singleNamedArgCallInAnnotationEntry.kt @@ -1,6 +1,6 @@ // "Create annotation 'bar'" "true" // ERROR: Unresolved reference: foo -[foo(1, "2", bar(fooBar = "3"))] fun test() { +@[foo(1, "2", bar(fooBar = "3"))] fun test() { } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/singleNamedArgCallInAnnotationEntry.kt.after b/idea/testData/quickfix/createFromUsage/createClass/callExpression/singleNamedArgCallInAnnotationEntry.kt.after index 8f51beeba93..71a139b7b45 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/singleNamedArgCallInAnnotationEntry.kt.after +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/singleNamedArgCallInAnnotationEntry.kt.after @@ -1,7 +1,7 @@ // "Create annotation 'bar'" "true" // ERROR: Unresolved reference: foo -[foo(1, "2", bar(fooBar = "3"))] fun test() { +@[foo(1, "2", bar(fooBar = "3"))] fun test() { } diff --git a/idea/testData/quickfix/migration/replaceJavaClassAsAnnotationParameter/manyFilesMultiple.after.kt b/idea/testData/quickfix/migration/replaceJavaClassAsAnnotationParameter/manyFilesMultiple.after.kt index 7c5d3cc8cbe..e5a97b52961 100644 --- a/idea/testData/quickfix/migration/replaceJavaClassAsAnnotationParameter/manyFilesMultiple.after.kt +++ b/idea/testData/quickfix/migration/replaceJavaClassAsAnnotationParameter/manyFilesMultiple.after.kt @@ -10,13 +10,13 @@ Ann1(MyClass1::class) class MyClass2 annotation class Ann2(val arg: Array>) -Ann2(arg = array(Double::class)) class MyClass3 [Ann1(Char::class)] () { +Ann2(arg = array(Double::class)) class MyClass3 @Ann1(Char::class) constructor() { annotation class Ann3(val arg: KClass<*> = Any::class) Ann3(String::class) class Nested { Ann1(arg = String::class) fun foo1() { annotation class LocalAnn(val arg: KClass<*>) - [LocalAnn(Class::class)] val x = 1 + @LocalAnn(Class::class) val x = 1 } } diff --git a/idea/testData/quickfix/migration/replaceJavaClassAsAnnotationParameter/manyFilesMultiple.before.Main.kt b/idea/testData/quickfix/migration/replaceJavaClassAsAnnotationParameter/manyFilesMultiple.before.Main.kt index 84c980b13ee..1356e7a2f9f 100644 --- a/idea/testData/quickfix/migration/replaceJavaClassAsAnnotationParameter/manyFilesMultiple.before.Main.kt +++ b/idea/testData/quickfix/migration/replaceJavaClassAsAnnotationParameter/manyFilesMultiple.before.Main.kt @@ -8,13 +8,13 @@ Ann1(javaClass()) class MyClass2 annotation class Ann2(val arg: Array>) -Ann2(arg = array(javaClass())) class MyClass3 [Ann1(javaClass())] () { +Ann2(arg = array(javaClass())) class MyClass3 @Ann1(javaClass()) constructor() { annotation class Ann3(val arg: Class<*> = javaClass()) Ann3(javaClass()) class Nested { Ann1(arg = javaClass()) fun foo1() { annotation class LocalAnn(val arg: Class<*>) - [LocalAnn(javaClass>())] val x = 1 + @LocalAnn(javaClass>()) val x = 1 } } diff --git a/idea/testData/quickfix/migration/replaceJavaClassWithKClassForJavaAnnotation/manyFilesMultiple.after.kt b/idea/testData/quickfix/migration/replaceJavaClassWithKClassForJavaAnnotation/manyFilesMultiple.after.kt index e6ba91d5634..f40dfdddcf4 100644 --- a/idea/testData/quickfix/migration/replaceJavaClassWithKClassForJavaAnnotation/manyFilesMultiple.after.kt +++ b/idea/testData/quickfix/migration/replaceJavaClassWithKClassForJavaAnnotation/manyFilesMultiple.after.kt @@ -7,12 +7,12 @@ Ann(String::class, arg = Int::class, x = 1, args = array(Double::class)) class M Ann(String::class, arg = Int::class, args = array(Double::class)) class Nested { Ann(String::class, arg = Int::class, args = array(Double::class)) fun foo1() { - [Ann(String::class, arg = Int::class, args = array(Double::class))] class Local + @Ann(String::class, arg = Int::class, args = array(Double::class)) class Local } - [Ann(String::class, arg = Int::class, args = array(Double::class), x = 1)] fun foo2() { + @Ann(String::class, arg = Int::class, args = array(Double::class), x = 1) fun foo2() { - [Ann(String::class, arg = Int::class, args = array(Double::class))] val local = 0 + @Ann(String::class, arg = Int::class, args = array(Double::class)) val local = 0 } } diff --git a/idea/testData/quickfix/migration/replaceJavaClassWithKClassForJavaAnnotation/manyFilesMultiple.before.Main.kt b/idea/testData/quickfix/migration/replaceJavaClassWithKClassForJavaAnnotation/manyFilesMultiple.before.Main.kt index a97232a4bb4..c05541f5586 100644 --- a/idea/testData/quickfix/migration/replaceJavaClassWithKClassForJavaAnnotation/manyFilesMultiple.before.Main.kt +++ b/idea/testData/quickfix/migration/replaceJavaClassWithKClassForJavaAnnotation/manyFilesMultiple.before.Main.kt @@ -7,12 +7,12 @@ Ann(javaClass(), arg = javaClass(), x = 1, args = array(javaClass(), arg = javaClass(), args = array(javaClass())) class Nested { Ann(javaClass(), arg = javaClass(), args = array(javaClass())) fun foo1() { - [Ann(javaClass(), arg = javaClass(), args = array(javaClass()))] class Local + @Ann(javaClass(), arg = javaClass(), args = array(javaClass())) class Local } - [Ann(javaClass(), arg = javaClass(), args = array(javaClass()), x = 1)] fun foo2() { + @Ann(javaClass(), arg = javaClass(), args = array(javaClass()), x = 1) fun foo2() { - [Ann(javaClass(), arg = javaClass(), args = array(javaClass()))] val local = 0 + @Ann(javaClass(), arg = javaClass(), args = array(javaClass())) val local = 0 } } diff --git a/idea/testData/quickfix/modifiers/cannotMakeClassAnnotation.kt b/idea/testData/quickfix/modifiers/cannotMakeClassAnnotation.kt index 24ba73d5229..26fb9805cd8 100644 --- a/idea/testData/quickfix/modifiers/cannotMakeClassAnnotation.kt +++ b/idea/testData/quickfix/modifiers/cannotMakeClassAnnotation.kt @@ -1,3 +1,3 @@ // "class org.jetbrains.kotlin.idea.quickfix.MakeClassAnAnnotationClassFix" "false" // ERROR: 'String' is not an annotation class -[String] class foo {} +@String class foo {} diff --git a/idea/testData/quickfix/modifiers/notAnAnnotationClass.kt b/idea/testData/quickfix/modifiers/notAnAnnotationClass.kt index 1792bd97baa..98b56142b32 100644 --- a/idea/testData/quickfix/modifiers/notAnAnnotationClass.kt +++ b/idea/testData/quickfix/modifiers/notAnAnnotationClass.kt @@ -1,4 +1,4 @@ // "Make 'fancy' an annotation class" "true" class fancy -[fancy] class foo {} +@fancy class foo {} diff --git a/idea/testData/quickfix/modifiers/notAnAnnotationClass.kt.after b/idea/testData/quickfix/modifiers/notAnAnnotationClass.kt.after index 1af416e4fe5..6342e2c4cb5 100644 --- a/idea/testData/quickfix/modifiers/notAnAnnotationClass.kt.after +++ b/idea/testData/quickfix/modifiers/notAnAnnotationClass.kt.after @@ -1,4 +1,4 @@ // "Make 'fancy' an annotation class" "true" annotation class fancy -[fancy] class foo {} +@fancy class foo {} diff --git a/idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionUnrelatedAnnotation.kt b/idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionUnrelatedAnnotation.kt index 4bcc291c49c..ec56b84303e 100644 --- a/idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionUnrelatedAnnotation.kt +++ b/idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionUnrelatedAnnotation.kt @@ -1,5 +1,5 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[ann] fun foo(): String?? = null +@ann fun foo(): String?? = null annotation class ann \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionUnrelatedAnnotation.kt.after b/idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionUnrelatedAnnotation.kt.after index aeb71c0e3fb..42ae11b0649 100644 --- a/idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionUnrelatedAnnotation.kt.after +++ b/idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionUnrelatedAnnotation.kt.after @@ -1,6 +1,6 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" @suppress("REDUNDANT_NULLABLE") -[ann] fun foo(): String?? = null +@ann fun foo(): String?? = null annotation class ann \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/errorRecovery/unresolvedAnnotation.kt b/idea/testData/quickfix/suppress/errorRecovery/unresolvedAnnotation.kt index 3a6cca8b210..c346222ac38 100644 --- a/idea/testData/quickfix/suppress/errorRecovery/unresolvedAnnotation.kt +++ b/idea/testData/quickfix/suppress/errorRecovery/unresolvedAnnotation.kt @@ -1,4 +1,4 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" // ERROR: Unresolved reference: ann -[ann] fun foo(): String?? = null \ No newline at end of file +@ann fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/errorRecovery/unresolvedAnnotation.kt.after b/idea/testData/quickfix/suppress/errorRecovery/unresolvedAnnotation.kt.after index 378d48cc38d..e896cfb56b9 100644 --- a/idea/testData/quickfix/suppress/errorRecovery/unresolvedAnnotation.kt.after +++ b/idea/testData/quickfix/suppress/errorRecovery/unresolvedAnnotation.kt.after @@ -2,4 +2,4 @@ // ERROR: Unresolved reference: ann @suppress("REDUNDANT_NULLABLE") -[ann] fun foo(): String?? = null \ No newline at end of file +@ann fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/annotatedExpr.kt b/idea/testData/quickfix/suppress/forStatement/annotatedExpr.kt index 2110e6c420c..2f870eee7bb 100644 --- a/idea/testData/quickfix/suppress/forStatement/annotatedExpr.kt +++ b/idea/testData/quickfix/suppress/forStatement/annotatedExpr.kt @@ -1,7 +1,7 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [ann] ""!! + @ann ""!! } annotation class ann \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/annotatedExpr.kt.after b/idea/testData/quickfix/suppress/forStatement/annotatedExpr.kt.after index dd2c9834a9c..9c74cb6f380 100644 --- a/idea/testData/quickfix/suppress/forStatement/annotatedExpr.kt.after +++ b/idea/testData/quickfix/suppress/forStatement/annotatedExpr.kt.after @@ -2,7 +2,7 @@ fun foo() { @suppress("UNNECESSARY_NOT_NULL_ASSERTION") - [ann] ""!! + @ann ""!! } annotation class ann \ No newline at end of file diff --git a/idea/testData/refactoring/changeSignature/ParameterModifiersAfter.kt b/idea/testData/refactoring/changeSignature/ParameterModifiersAfter.kt index 0de49e4ab6f..2b3971da893 100644 --- a/idea/testData/refactoring/changeSignature/ParameterModifiersAfter.kt +++ b/idea/testData/refactoring/changeSignature/ParameterModifiersAfter.kt @@ -1,3 +1,3 @@ annotation class foo(val n: Int) -class Test([foo(1) foo(2)] [foo(3)] private val s: String, n: Int) \ No newline at end of file +class Test(@foo(1) @foo(2) @foo(3) private val s: String, n: Int) \ No newline at end of file diff --git a/idea/testData/refactoring/changeSignature/ParameterModifiersBefore.kt b/idea/testData/refactoring/changeSignature/ParameterModifiersBefore.kt index c62289b0d81..e39d9b9ec6a 100644 --- a/idea/testData/refactoring/changeSignature/ParameterModifiersBefore.kt +++ b/idea/testData/refactoring/changeSignature/ParameterModifiersBefore.kt @@ -1,3 +1,3 @@ annotation class foo(val n: Int) -class Test([foo(1) foo(2)] [foo(3)] private val s: String) \ No newline at end of file +class Test(@foo(1) @foo(2) @foo(3) private val s: String) \ No newline at end of file diff --git a/idea/testData/refactoring/extractFunction/parameters/misc/qualifiedAnnotation.kt b/idea/testData/refactoring/extractFunction/parameters/misc/qualifiedAnnotation.kt index e61b704f522..faf018b9b94 100644 --- a/idea/testData/refactoring/extractFunction/parameters/misc/qualifiedAnnotation.kt +++ b/idea/testData/refactoring/extractFunction/parameters/misc/qualifiedAnnotation.kt @@ -1,7 +1,7 @@ // SIBLING: class MyClass { fun test() { - [P] val t: Int = 1 + @[P] val t: Int = 1 t } diff --git a/idea/testData/refactoring/extractFunction/parameters/misc/qualifiedAnnotation.kt.after b/idea/testData/refactoring/extractFunction/parameters/misc/qualifiedAnnotation.kt.after index 2fb76bc2192..3f7eac3ab9e 100644 --- a/idea/testData/refactoring/extractFunction/parameters/misc/qualifiedAnnotation.kt.after +++ b/idea/testData/refactoring/extractFunction/parameters/misc/qualifiedAnnotation.kt.after @@ -8,6 +8,6 @@ class MyClass { } private fun __dummyTestFun__() { - [MyClass.P] val t: Int = 1 + @[MyClass.P] val t: Int = 1 t } \ No newline at end of file diff --git a/idea/testData/resolve/references/AnnotationOnFile.kt b/idea/testData/resolve/references/AnnotationOnFile.kt index 8fa50cb62fe..2baaabb4168 100644 --- a/idea/testData/resolve/references/AnnotationOnFile.kt +++ b/idea/testData/resolve/references/AnnotationOnFile.kt @@ -1,4 +1,4 @@ -[file: kotlin.deprecated("message")] +@file:[kotlin.deprecated("message")] package foo diff --git a/idea/testData/resolve/references/AnnotationOnFileWithImport.kt b/idea/testData/resolve/references/AnnotationOnFileWithImport.kt index baa50f587f0..6a806d300db 100644 --- a/idea/testData/resolve/references/AnnotationOnFileWithImport.kt +++ b/idea/testData/resolve/references/AnnotationOnFileWithImport.kt @@ -1,4 +1,4 @@ -[file: D("message")] +@file:[D("message")] package foo diff --git a/idea/testData/resolve/references/AnnotationParameter.kt b/idea/testData/resolve/references/AnnotationParameter.kt index 0d83eb9f042..4b4995b1fda 100644 --- a/idea/testData/resolve/references/AnnotationParameter.kt +++ b/idea/testData/resolve/references/AnnotationParameter.kt @@ -3,7 +3,7 @@ package testing annotation class Annotation(val clazz: Class) class ATest -[Annotation(javaClass<ATest>())] +@[Annotation(javaClass<ATest>())] class BTest // REF: (testing).ATest \ No newline at end of file diff --git a/idea/testData/resolve/references/AnnotationTypeParameter.kt b/idea/testData/resolve/references/AnnotationTypeParameter.kt index 687d6740c62..fbb6e8505d5 100644 --- a/idea/testData/resolve/references/AnnotationTypeParameter.kt +++ b/idea/testData/resolve/references/AnnotationTypeParameter.kt @@ -3,7 +3,7 @@ package testing annotation class Annotation(val clazz: Class) class ATest -[Annotation<ATest>(javaClass())] +@[Annotation<ATest>(javaClass())] class BTest // REF: (testing).ATest \ No newline at end of file diff --git a/idea/testData/search/annotations/testAnnotationsOnClass.kt b/idea/testData/search/annotations/testAnnotationsOnClass.kt index c93fef26160..85272748316 100644 --- a/idea/testData/search/annotations/testAnnotationsOnClass.kt +++ b/idea/testData/search/annotations/testAnnotationsOnClass.kt @@ -1,6 +1,6 @@ -[Deprecated] class TestClass1 {} +@Deprecated class TestClass1 {} -[java.lang.Deprecated] class TestClass2 {} +@java.lang.Deprecated class TestClass2 {} Deprecated class TestClass3 {} diff --git a/idea/testData/search/junit/testJunit4.kt b/idea/testData/search/junit/testJunit4.kt index f242dae05be..be61f64ba61 100644 --- a/idea/testData/search/junit/testJunit4.kt +++ b/idea/testData/search/junit/testJunit4.kt @@ -1,17 +1,17 @@ import org.junit.Test class MyTestClass { - [org.junit.Test] fun test1() {} + @org.junit.Test fun test1() {} org.junit.Test fun test2() {} - [Test] fun test3() {} + @Test fun test3() {} Test fun test4() {} - [Deprecated org.junit.Test] fun test5() {} + @Deprecated @org.junit.Test fun test5() {} - [Deprecated Test] fun test6() {} + @Deprecated @Test fun test6() {} fun test7() {} } diff --git a/idea/testData/search/junit/testJunit4Alias.kt b/idea/testData/search/junit/testJunit4Alias.kt index 0f5beb24aba..5c0652f6285 100644 --- a/idea/testData/search/junit/testJunit4Alias.kt +++ b/idea/testData/search/junit/testJunit4Alias.kt @@ -4,7 +4,7 @@ import org.junit.Test class MyTestClass { test fun test1() {} - [Deprecated test] fun test2() {} + @Deprecated @test fun test2() {} Test fun test3() {} } diff --git a/idea/testData/stubs/AnnotationOnLocalFunction.kt b/idea/testData/stubs/AnnotationOnLocalFunction.kt index 76d03a6c38a..217ba4b339e 100644 --- a/idea/testData/stubs/AnnotationOnLocalFunction.kt +++ b/idea/testData/stubs/AnnotationOnLocalFunction.kt @@ -1,4 +1,4 @@ fun foo() { - [Deprecated] fun innerFoo() { + @[Deprecated] fun innerFoo() { } } \ No newline at end of file diff --git a/idea/testData/stubs/AnnotationsOnPrimaryCtr.kt b/idea/testData/stubs/AnnotationsOnPrimaryCtr.kt index de7fd3e9959..d68e496a736 100644 --- a/idea/testData/stubs/AnnotationsOnPrimaryCtr.kt +++ b/idea/testData/stubs/AnnotationsOnPrimaryCtr.kt @@ -1 +1 @@ -class A [Deprecated] private [Override Deprecated] () +class A @[Deprecated] private @[Override Deprecated] () diff --git a/idea/testData/stubs/DanglingAnnotations.kt b/idea/testData/stubs/DanglingAnnotations.kt index 313022386b7..436ff627376 100644 --- a/idea/testData/stubs/DanglingAnnotations.kt +++ b/idea/testData/stubs/DanglingAnnotations.kt @@ -1,5 +1,5 @@ class C { - [Ann] + @[Ann] } -[Ann] \ No newline at end of file +@[Ann] \ No newline at end of file diff --git a/idea/testData/stubs/ManyAnnotationsOnFunction.kt b/idea/testData/stubs/ManyAnnotationsOnFunction.kt index 4ed010ec40e..41dc99ef185 100644 --- a/idea/testData/stubs/ManyAnnotationsOnFunction.kt +++ b/idea/testData/stubs/ManyAnnotationsOnFunction.kt @@ -1,2 +1,2 @@ -[Deprecated Override] fun foo() { +@[Deprecated Override] fun foo() { } \ No newline at end of file diff --git a/idea/testData/stubs/PropertyAsPropertyInitalizerInvalidCode.kt b/idea/testData/stubs/PropertyAsPropertyInitalizerInvalidCode.kt index 3042507019a..92d34a9f4c2 100644 --- a/idea/testData/stubs/PropertyAsPropertyInitalizerInvalidCode.kt +++ b/idea/testData/stubs/PropertyAsPropertyInitalizerInvalidCode.kt @@ -1 +1 @@ -val c = [x] val a \ No newline at end of file +val c = @[x] val a \ No newline at end of file diff --git a/idea/testData/stubs/TypeAnnotation.kt b/idea/testData/stubs/TypeAnnotation.kt index 2e6942e1a15..050c0655005 100644 --- a/idea/testData/stubs/TypeAnnotation.kt +++ b/idea/testData/stubs/TypeAnnotation.kt @@ -4,4 +4,4 @@ annotation class b(val e: E) enum class E { E1 E2 } -fun types(param: [a] [b(E.E1)] DoubleRange): [a] [b(E.E2)] Unit {} +fun types(param: @[a] @[b(E.E1)] DoubleRange): @[a] @[b(E.E2)] Unit {} diff --git a/jps-plugin/testData/incremental/pureKotlin/annotations/annotations.kt b/jps-plugin/testData/incremental/pureKotlin/annotations/annotations.kt index b3ba1990abf..c3d5c542a45 100644 --- a/jps-plugin/testData/incremental/pureKotlin/annotations/annotations.kt +++ b/jps-plugin/testData/incremental/pureKotlin/annotations/annotations.kt @@ -2,12 +2,12 @@ package test annotation class Anno -[Anno] fun f() { +@Anno fun f() { } -[Anno] val v1 = "" +@Anno val v1 = "" var v2: String get() = "" - [Anno] set(value) { + @Anno set(value) { } diff --git a/js/js.translator/testData/inline/cases/anonymousObjectInlineMethod.kt b/js/js.translator/testData/inline/cases/anonymousObjectInlineMethod.kt index 0b0d18de5fc..9ff87842187 100644 --- a/js/js.translator/testData/inline/cases/anonymousObjectInlineMethod.kt +++ b/js/js.translator/testData/inline/cases/anonymousObjectInlineMethod.kt @@ -2,7 +2,7 @@ package foo fun add(a: Int, b: Int): Int { val o = object { - [inline] fun add(a: Int, b: Int): Int = a + b + @inline fun add(a: Int, b: Int): Int = a + b } return o.add(a, b) diff --git a/js/js.translator/testData/inline/cases/callableReferenceOfLocalInline.kt b/js/js.translator/testData/inline/cases/callableReferenceOfLocalInline.kt index 8233dab758d..c9872a2c4a9 100644 --- a/js/js.translator/testData/inline/cases/callableReferenceOfLocalInline.kt +++ b/js/js.translator/testData/inline/cases/callableReferenceOfLocalInline.kt @@ -1,7 +1,7 @@ package foo fun multiplyBy(x: Int): () -> ((Int) -> Int) { - [inline] fun applyMultiplication(y: Int): Int = x * y + @inline fun applyMultiplication(y: Int): Int = x * y return { ::applyMultiplication } } diff --git a/js/js.translator/testData/inline/cases/localInlineExtensionFunction.kt b/js/js.translator/testData/inline/cases/localInlineExtensionFunction.kt index c00c4779b77..e47912478c7 100644 --- a/js/js.translator/testData/inline/cases/localInlineExtensionFunction.kt +++ b/js/js.translator/testData/inline/cases/localInlineExtensionFunction.kt @@ -12,7 +12,7 @@ inline fun repeatAction(times: Int, action: () -> Unit) { } fun capturedInLambda(state: State, a: Int, b: Int): Int { - [inline] fun State.inc() { + @inline fun State.inc() { count++ } @@ -26,7 +26,7 @@ fun capturedInLambda(state: State, a: Int, b: Int): Int { fun declaredInLambda(state: State, a: Int, b: Int): Int { repeatAction(a) { - [inline] fun State.inc() { + @inline fun State.inc() { count++ } diff --git a/js/js.translator/testData/inline/cases/localInlineFunction.kt b/js/js.translator/testData/inline/cases/localInlineFunction.kt index b87230cf230..01bc34cb1e0 100644 --- a/js/js.translator/testData/inline/cases/localInlineFunction.kt +++ b/js/js.translator/testData/inline/cases/localInlineFunction.kt @@ -12,7 +12,7 @@ inline fun repeatAction(times: Int, action: () -> Unit) { fun localWithoutCapture(a: Int, b: Int): Int { var sum = 0 - [inline] fun inc(x: Int): Int { + @inline fun inc(x: Int): Int { return x + 1 } @@ -26,7 +26,7 @@ fun localWithoutCapture(a: Int, b: Int): Int { fun localWithCapture(a: Int, b: Int): Int { var sum = 0 - [inline] fun inc() { + @inline fun inc() { sum++ } diff --git a/js/js.translator/testData/inline/cases/localInlineFunctionComplex.kt b/js/js.translator/testData/inline/cases/localInlineFunctionComplex.kt index 2c7e9c8e6c8..920870e083c 100644 --- a/js/js.translator/testData/inline/cases/localInlineFunctionComplex.kt +++ b/js/js.translator/testData/inline/cases/localInlineFunctionComplex.kt @@ -11,21 +11,21 @@ inline fun repeatAction(times: Int, action: () -> Unit) { } fun add(state: State, a: Int, b: Int): Int { - [inline] fun inc(a: Int): Int { + @inline fun inc(a: Int): Int { return a + 1 } - [inline] fun inc1(a: Int): Int { + @inline fun inc1(a: Int): Int { return inc(a) } repeatAction(a) { - [inline] fun inc2(a: Int): Int { + @inline fun inc2(a: Int): Int { return inc1(a) } repeatAction(b) { - [inline] fun State.inc() { + @inline fun State.inc() { count = inc2(count) } diff --git a/js/js.translator/testData/inline/cases/localInlineFunctionDeclaredInLambda.kt b/js/js.translator/testData/inline/cases/localInlineFunctionDeclaredInLambda.kt index bdb5cd27a72..a6fad44ca50 100644 --- a/js/js.translator/testData/inline/cases/localInlineFunctionDeclaredInLambda.kt +++ b/js/js.translator/testData/inline/cases/localInlineFunctionDeclaredInLambda.kt @@ -13,7 +13,7 @@ fun localWithoutCapture(a: Int, b: Int): Int { var mult = 0 repeatAction(a) { - [inline] fun inc(x: Int): Int { + @inline fun inc(x: Int): Int { return x + 1 } @@ -29,7 +29,7 @@ fun localWithCapture(a: Int, b: Int): Int { var mult = 0 repeatAction(a) { - [inline] fun inc() { + @inline fun inc() { mult++ } diff --git a/js/js.translator/testData/inline/cases/localInlineFunctionNameClash.kt b/js/js.translator/testData/inline/cases/localInlineFunctionNameClash.kt index 7ff7d639955..1fccfdee227 100644 --- a/js/js.translator/testData/inline/cases/localInlineFunctionNameClash.kt +++ b/js/js.translator/testData/inline/cases/localInlineFunctionNameClash.kt @@ -9,7 +9,7 @@ inline fun run(action: () -> Int): Int { fun add(a: Int, b: Int): Int { var sum = a + b - [inline] fun getSum(): Int { + @inline fun getSum(): Int { return sum } diff --git a/js/js.translator/testData/inline/cases/localInlineFunctionReference.kt b/js/js.translator/testData/inline/cases/localInlineFunctionReference.kt index 3a49398941f..8375b522c82 100644 --- a/js/js.translator/testData/inline/cases/localInlineFunctionReference.kt +++ b/js/js.translator/testData/inline/cases/localInlineFunctionReference.kt @@ -1,7 +1,7 @@ package foo fun multiplyBy(a: Int): (Int) -> Int { - [inline] fun multiply(b: Int): Int = a * b + @inline fun multiply(b: Int): Int = a * b return ::multiply } diff --git a/js/js.translator/testData/inline/cases/simpleEnum.kt b/js/js.translator/testData/inline/cases/simpleEnum.kt index 4a0ffdbac81..ea409e09a67 100644 --- a/js/js.translator/testData/inline/cases/simpleEnum.kt +++ b/js/js.translator/testData/inline/cases/simpleEnum.kt @@ -9,7 +9,7 @@ enum class MyEnum { K; //TODO: KT-4693 - [inline] fun doSmth(a: T) : String { + @inline fun doSmth(a: T) : String { return a.toString() + K.name() } } diff --git a/js/js.translator/testData/labels/cases/nestedLabelsInlinedClashingAtFunctionsWithClosure.kt b/js/js.translator/testData/labels/cases/nestedLabelsInlinedClashingAtFunctionsWithClosure.kt index a543e09b6db..9b66e8e070f 100644 --- a/js/js.translator/testData/labels/cases/nestedLabelsInlinedClashingAtFunctionsWithClosure.kt +++ b/js/js.translator/testData/labels/cases/nestedLabelsInlinedClashingAtFunctionsWithClosure.kt @@ -9,9 +9,9 @@ class State() { } noinline fun test(state: State) { - [inline] fun test3() { - [inline] fun test2() { - [inline] fun test1() { + @inline fun test3() { + @inline fun test2() { + @inline fun test1() { loop@ for (i in 1..10) { state.value++ if (i == 2) break@loop diff --git a/plugins/annotation-collector/testData/collectToFile/annotatedGettersSetters/annotatedGettersSetters.kt b/plugins/annotation-collector/testData/collectToFile/annotatedGettersSetters/annotatedGettersSetters.kt index e4b499b767c..7a54305bfd6 100644 --- a/plugins/annotation-collector/testData/collectToFile/annotatedGettersSetters/annotatedGettersSetters.kt +++ b/plugins/annotation-collector/testData/collectToFile/annotatedGettersSetters/annotatedGettersSetters.kt @@ -3,10 +3,10 @@ package org.test public data class SomeClass { public val immutableProperty: Int = 5 - [Deprecated] get + @Deprecated get public var mutableProperty: String = "String" - [Deprecated] get - [Deprecated] set + @Deprecated get + @Deprecated set } \ No newline at end of file diff --git a/plugins/annotation-collector/testData/collectToFile/anonymousClasses/anonymousClasses.kt b/plugins/annotation-collector/testData/collectToFile/anonymousClasses/anonymousClasses.kt index 0024e704151..9e81b659181 100644 --- a/plugins/annotation-collector/testData/collectToFile/anonymousClasses/anonymousClasses.kt +++ b/plugins/annotation-collector/testData/collectToFile/anonymousClasses/anonymousClasses.kt @@ -4,7 +4,7 @@ public class SomeClass { private fun a() { object : Any() { - [Deprecated] + @Deprecated val property: Int = 5 } diff --git a/plugins/annotation-collector/testData/collectToFile/constructors/constructors.kt b/plugins/annotation-collector/testData/collectToFile/constructors/constructors.kt index 2cc16eb9ab6..00afe77a5c1 100644 --- a/plugins/annotation-collector/testData/collectToFile/constructors/constructors.kt +++ b/plugins/annotation-collector/testData/collectToFile/constructors/constructors.kt @@ -2,11 +2,11 @@ package org.test public class SomeClass { - [Deprecated] constructor() { + @Deprecated constructor() { } - [Deprecated] constructor(s: String) { + @Deprecated constructor(s: String) { } diff --git a/plugins/annotation-collector/testData/collectToFile/defaultPackage/defaultPackage.kt b/plugins/annotation-collector/testData/collectToFile/defaultPackage/defaultPackage.kt index 5623a97f744..8815bb10a4b 100644 --- a/plugins/annotation-collector/testData/collectToFile/defaultPackage/defaultPackage.kt +++ b/plugins/annotation-collector/testData/collectToFile/defaultPackage/defaultPackage.kt @@ -1,6 +1,6 @@ data public class SomeClass { - [Deprecated] public var annotatedProperty: String? = null + @Deprecated public var annotatedProperty: String? = null Deprecated public inline fun annotatedFunction() { diff --git a/plugins/annotation-collector/testData/collectToFile/localClasses/localClasses.kt b/plugins/annotation-collector/testData/collectToFile/localClasses/localClasses.kt index e3a234b2222..906fa5798fd 100644 --- a/plugins/annotation-collector/testData/collectToFile/localClasses/localClasses.kt +++ b/plugins/annotation-collector/testData/collectToFile/localClasses/localClasses.kt @@ -3,7 +3,7 @@ package org.test public class SomeClass { public fun someFunction() { - [Deprecated] class LocalClass { + @Deprecated class LocalClass { public Deprecated var annotatedProperty: String? = null diff --git a/plugins/annotation-collector/testData/collectToFile/methodAnnotations/methodAnnotations.kt b/plugins/annotation-collector/testData/collectToFile/methodAnnotations/methodAnnotations.kt index bf2f599b98d..942ef09f107 100644 --- a/plugins/annotation-collector/testData/collectToFile/methodAnnotations/methodAnnotations.kt +++ b/plugins/annotation-collector/testData/collectToFile/methodAnnotations/methodAnnotations.kt @@ -4,7 +4,7 @@ public class SomeClass { public fun annotatedFunction() { - [Deprecated] fun localFunction() { + @Deprecated fun localFunction() { }