diff --git a/compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt b/compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt index ef6ec161a84..2a2bc1b115b 100644 --- a/compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt +++ b/compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt @@ -1,4 +1,5 @@ @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Annotation fun box(): String { diff --git a/compiler/testData/codegen/bytecodeListing/annotations/kt9320.kt b/compiler/testData/codegen/bytecodeListing/annotations/kt9320.kt index 93c9a548e39..146922068b2 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/kt9320.kt +++ b/compiler/testData/codegen/bytecodeListing/annotations/kt9320.kt @@ -3,6 +3,7 @@ annotation class Ann @Ann open class My @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class AnnExpr fun foo() { diff --git a/compiler/testData/codegen/bytecodeListing/annotations/kt9320.txt b/compiler/testData/codegen/bytecodeListing/annotations/kt9320.txt index 8f363aedfcb..8b6baf83273 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/kt9320.txt +++ b/compiler/testData/codegen/bytecodeListing/annotations/kt9320.txt @@ -3,6 +3,7 @@ public annotation class Ann @kotlin.annotation.Target +@kotlin.annotation.Retention @java.lang.annotation.Retention @java.lang.annotation.Target @kotlin.Metadata diff --git a/compiler/testData/codegen/bytecodeListing/annotations/literals.kt b/compiler/testData/codegen/bytecodeListing/annotations/literals.kt index 572c4f27aa3..f25566a7679 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/literals.kt +++ b/compiler/testData/codegen/bytecodeListing/annotations/literals.kt @@ -5,6 +5,7 @@ annotation class ClsAnn annotation class FunAnn @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class ExprAnn fun bar(arg: () -> Int) = arg() diff --git a/compiler/testData/codegen/bytecodeListing/annotations/literals.txt b/compiler/testData/codegen/bytecodeListing/annotations/literals.txt index f33ce745795..41d5f954c26 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/literals.txt +++ b/compiler/testData/codegen/bytecodeListing/annotations/literals.txt @@ -5,6 +5,7 @@ public annotation class ClsAnn @kotlin.annotation.Target +@kotlin.annotation.Retention @java.lang.annotation.Retention @java.lang.annotation.Target @kotlin.Metadata @@ -63,4 +64,4 @@ public final class LiteralsKt { @kotlin.Metadata public class My { public method (): void -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/interface13.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/interface13.txt index c5f16ac6a28..14c48063f67 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/interface13.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/interface13.txt @@ -87,17 +87,3 @@ public interface F { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } } - -public interface F { - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - public companion object Companion { - private constructor Companion() - @kotlin.jvm.JvmField public open val a: kotlin.Int = 3 - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } -} diff --git a/idea/testData/inspectionsLocal/redundantSemicolon/beforeAnnotationAndLambda.kt b/idea/testData/inspectionsLocal/redundantSemicolon/beforeAnnotationAndLambda.kt index eed25f7304a..1e55d8f7883 100644 --- a/idea/testData/inspectionsLocal/redundantSemicolon/beforeAnnotationAndLambda.kt +++ b/idea/testData/inspectionsLocal/redundantSemicolon/beforeAnnotationAndLambda.kt @@ -8,4 +8,5 @@ fun foo() {} fun ((Int) -> Unit).doIt() {} @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann(val bar: String) \ No newline at end of file diff --git a/idea/testData/intentions/branched/doubleBangToIfThen/withAnnotation.kt b/idea/testData/intentions/branched/doubleBangToIfThen/withAnnotation.kt index 26168747d35..859a395fff4 100644 --- a/idea/testData/intentions/branched/doubleBangToIfThen/withAnnotation.kt +++ b/idea/testData/intentions/branched/doubleBangToIfThen/withAnnotation.kt @@ -1,4 +1,5 @@ @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann fun foo(arg: String?) { diff --git a/idea/testData/intentions/branched/doubleBangToIfThen/withAnnotation.kt.after b/idea/testData/intentions/branched/doubleBangToIfThen/withAnnotation.kt.after index e1c5d6c50be..500be1f6ca4 100644 --- a/idea/testData/intentions/branched/doubleBangToIfThen/withAnnotation.kt.after +++ b/idea/testData/intentions/branched/doubleBangToIfThen/withAnnotation.kt.after @@ -1,4 +1,5 @@ @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann fun foo(arg: String?) { diff --git a/idea/testData/intentions/branched/ifWhen/ifToWhen/withAnnotation.kt b/idea/testData/intentions/branched/ifWhen/ifToWhen/withAnnotation.kt index ec94dd7274d..c786f336cf3 100644 --- a/idea/testData/intentions/branched/ifWhen/ifToWhen/withAnnotation.kt +++ b/idea/testData/intentions/branched/ifWhen/ifToWhen/withAnnotation.kt @@ -1,6 +1,7 @@ var b = true @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann fun println(s: String) {} diff --git a/idea/testData/intentions/branched/ifWhen/ifToWhen/withAnnotation.kt.after b/idea/testData/intentions/branched/ifWhen/ifToWhen/withAnnotation.kt.after index ee2765542a7..cbbbc9bfe1c 100644 --- a/idea/testData/intentions/branched/ifWhen/ifToWhen/withAnnotation.kt.after +++ b/idea/testData/intentions/branched/ifWhen/ifToWhen/withAnnotation.kt.after @@ -1,6 +1,7 @@ var b = true @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann fun println(s: String) {} diff --git a/idea/testData/intentions/convertToBlockBody/annotatedExpr.kt b/idea/testData/intentions/convertToBlockBody/annotatedExpr.kt index 4185583095b..8bbef88d1a8 100644 --- a/idea/testData/intentions/convertToBlockBody/annotatedExpr.kt +++ b/idea/testData/intentions/convertToBlockBody/annotatedExpr.kt @@ -1,4 +1,5 @@ @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class ann fun foo(): Int = @ann 1 \ No newline at end of file diff --git a/idea/testData/intentions/convertToBlockBody/annotatedExpr.kt.after b/idea/testData/intentions/convertToBlockBody/annotatedExpr.kt.after index ceae330f3c4..b867c306ec4 100644 --- a/idea/testData/intentions/convertToBlockBody/annotatedExpr.kt.after +++ b/idea/testData/intentions/convertToBlockBody/annotatedExpr.kt.after @@ -1,4 +1,5 @@ @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class ann fun foo(): Int { diff --git a/idea/testData/intentions/simplifyBooleanWithConstants/withAnnotation.kt b/idea/testData/intentions/simplifyBooleanWithConstants/withAnnotation.kt index 670b2a1dd83..e70d0a49456 100644 --- a/idea/testData/intentions/simplifyBooleanWithConstants/withAnnotation.kt +++ b/idea/testData/intentions/simplifyBooleanWithConstants/withAnnotation.kt @@ -1,6 +1,7 @@ var b = true @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann fun foo() { diff --git a/idea/testData/intentions/simplifyBooleanWithConstants/withAnnotation.kt.after b/idea/testData/intentions/simplifyBooleanWithConstants/withAnnotation.kt.after index 5690ab098df..117fad7206d 100644 --- a/idea/testData/intentions/simplifyBooleanWithConstants/withAnnotation.kt.after +++ b/idea/testData/intentions/simplifyBooleanWithConstants/withAnnotation.kt.after @@ -1,6 +1,7 @@ var b = true @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann fun foo() { diff --git a/idea/testData/quickfix/addAnnotationTarget/expression.kt b/idea/testData/quickfix/addAnnotationTarget/expression.kt index 2e359226df1..eaec17ae35f 100644 --- a/idea/testData/quickfix/addAnnotationTarget/expression.kt +++ b/idea/testData/quickfix/addAnnotationTarget/expression.kt @@ -1,4 +1,5 @@ // "Add annotation target" "true" +@Retention(AnnotationRetention.SOURCE) annotation class Foo fun test() { diff --git a/idea/testData/quickfix/addAnnotationTarget/expression.kt.after b/idea/testData/quickfix/addAnnotationTarget/expression.kt.after index fe97eef27a4..8060c88cff4 100644 --- a/idea/testData/quickfix/addAnnotationTarget/expression.kt.after +++ b/idea/testData/quickfix/addAnnotationTarget/expression.kt.after @@ -1,5 +1,6 @@ // "Add annotation target" "true" @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Foo fun test() { diff --git a/idea/testData/quickfix/addNewLineAfterAnnotations/basic.kt b/idea/testData/quickfix/addNewLineAfterAnnotations/basic.kt index 2a5ba49d39e..317c5007019 100644 --- a/idea/testData/quickfix/addNewLineAfterAnnotations/basic.kt +++ b/idea/testData/quickfix/addNewLineAfterAnnotations/basic.kt @@ -1,6 +1,7 @@ // "Add new line after annotations" "true" @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann fun foo(y: Int) { diff --git a/idea/testData/quickfix/addNewLineAfterAnnotations/basic.kt.after b/idea/testData/quickfix/addNewLineAfterAnnotations/basic.kt.after index 506b6db3096..25a90c4217c 100644 --- a/idea/testData/quickfix/addNewLineAfterAnnotations/basic.kt.after +++ b/idea/testData/quickfix/addNewLineAfterAnnotations/basic.kt.after @@ -1,6 +1,7 @@ // "Add new line after annotations" "true" @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann fun foo(y: Int) { diff --git a/idea/testData/quickfix/addNewLineAfterAnnotations/manyAnnotations.kt b/idea/testData/quickfix/addNewLineAfterAnnotations/manyAnnotations.kt index 61dcb71f757..3066a777a06 100644 --- a/idea/testData/quickfix/addNewLineAfterAnnotations/manyAnnotations.kt +++ b/idea/testData/quickfix/addNewLineAfterAnnotations/manyAnnotations.kt @@ -1,9 +1,11 @@ // "Add new line after annotations" "true" @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann2(val x: String) fun foo(y: Int) { diff --git a/idea/testData/quickfix/addNewLineAfterAnnotations/manyAnnotations.kt.after b/idea/testData/quickfix/addNewLineAfterAnnotations/manyAnnotations.kt.after index cf794d7876a..c2ee2f95d1b 100644 --- a/idea/testData/quickfix/addNewLineAfterAnnotations/manyAnnotations.kt.after +++ b/idea/testData/quickfix/addNewLineAfterAnnotations/manyAnnotations.kt.after @@ -1,9 +1,11 @@ // "Add new line after annotations" "true" @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann2(val x: String) fun foo(y: Int) { diff --git a/idea/testData/quickfix/addNewLineAfterAnnotations/poorlyFormattedExpression.kt b/idea/testData/quickfix/addNewLineAfterAnnotations/poorlyFormattedExpression.kt index ecba19ebdb9..d4ff9ca387c 100644 --- a/idea/testData/quickfix/addNewLineAfterAnnotations/poorlyFormattedExpression.kt +++ b/idea/testData/quickfix/addNewLineAfterAnnotations/poorlyFormattedExpression.kt @@ -1,6 +1,7 @@ // "Add new line after annotations" "true" @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann fun foo(y: IntArray) { diff --git a/idea/testData/quickfix/addNewLineAfterAnnotations/poorlyFormattedExpression.kt.after b/idea/testData/quickfix/addNewLineAfterAnnotations/poorlyFormattedExpression.kt.after index 84d46eb12f0..4908f452386 100644 --- a/idea/testData/quickfix/addNewLineAfterAnnotations/poorlyFormattedExpression.kt.after +++ b/idea/testData/quickfix/addNewLineAfterAnnotations/poorlyFormattedExpression.kt.after @@ -1,6 +1,7 @@ // "Add new line after annotations" "true" @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann fun foo(y: IntArray) { diff --git a/idea/testData/quickfix/addNewLineAfterAnnotations/preserveComments.kt b/idea/testData/quickfix/addNewLineAfterAnnotations/preserveComments.kt index 1a4aaaa55f3..c0c69ca1e2e 100644 --- a/idea/testData/quickfix/addNewLineAfterAnnotations/preserveComments.kt +++ b/idea/testData/quickfix/addNewLineAfterAnnotations/preserveComments.kt @@ -1,9 +1,11 @@ // "Add new line after annotations" "true" @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann2(val x: String) fun foo(y: Int) { diff --git a/idea/testData/quickfix/addNewLineAfterAnnotations/preserveComments.kt.after b/idea/testData/quickfix/addNewLineAfterAnnotations/preserveComments.kt.after index b2e4e5dc814..70645773a13 100644 --- a/idea/testData/quickfix/addNewLineAfterAnnotations/preserveComments.kt.after +++ b/idea/testData/quickfix/addNewLineAfterAnnotations/preserveComments.kt.after @@ -1,9 +1,11 @@ // "Add new line after annotations" "true" @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class Ann2(val x: String) fun foo(y: Int) { diff --git a/idea/testData/quickfix/suppress/forStatement/annotatedExpr.kt b/idea/testData/quickfix/suppress/forStatement/annotatedExpr.kt index 9a18d2346e7..ba5aa9e11fd 100644 --- a/idea/testData/quickfix/suppress/forStatement/annotatedExpr.kt +++ b/idea/testData/quickfix/suppress/forStatement/annotatedExpr.kt @@ -5,4 +5,5 @@ fun foo() { } @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) 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 161c86e65d0..fed6a24990c 100644 --- a/idea/testData/quickfix/suppress/forStatement/annotatedExpr.kt.after +++ b/idea/testData/quickfix/suppress/forStatement/annotatedExpr.kt.after @@ -6,4 +6,5 @@ fun foo() { } @Target(AnnotationTarget.EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class ann \ No newline at end of file