From c9f721848a51ac12192cffbdf153a178ecbca9fc Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Mon, 25 May 2020 18:28:55 +0300 Subject: [PATCH] Fix Throws declaration in Native diagnostics tests Align annotation target with real declaration in Native stdlib --- compiler/testData/diagnostics/nativeTests/throws.kt | 2 +- compiler/testData/diagnostics/nativeTests/throws.txt | 2 +- compiler/testData/diagnostics/nativeTests/throwsClash.kt | 2 +- compiler/testData/diagnostics/nativeTests/throwsClash.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/testData/diagnostics/nativeTests/throws.kt b/compiler/testData/diagnostics/nativeTests/throws.kt index 41586534ac0..0d7aa1bda12 100644 --- a/compiler/testData/diagnostics/nativeTests/throws.kt +++ b/compiler/testData/diagnostics/nativeTests/throws.kt @@ -3,7 +3,7 @@ package kotlin import kotlin.reflect.KClass -@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.CONSTRUCTOR) +@Target(AnnotationTarget.FUNCTION, AnnotationTarget.CONSTRUCTOR) @Retention(AnnotationRetention.SOURCE) public annotation class Throws(vararg val exceptionClasses: KClass) diff --git a/compiler/testData/diagnostics/nativeTests/throws.txt b/compiler/testData/diagnostics/nativeTests/throws.txt index 8315d0adb8c..23712ebc0c7 100644 --- a/compiler/testData/diagnostics/nativeTests/throws.txt +++ b/compiler/testData/diagnostics/nativeTests/throws.txt @@ -464,7 +464,7 @@ package kotlin { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.CONSTRUCTOR}) @kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) public final annotation class Throws : kotlin.Annotation { + @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.CONSTRUCTOR}) @kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) public final annotation class Throws : kotlin.Annotation { public constructor Throws(/*0*/ vararg exceptionClasses: kotlin.reflect.KClass /*kotlin.Array>*/) public final val exceptionClasses: kotlin.Array> public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/nativeTests/throwsClash.kt b/compiler/testData/diagnostics/nativeTests/throwsClash.kt index 713b91425f2..ddd25185404 100644 --- a/compiler/testData/diagnostics/nativeTests/throwsClash.kt +++ b/compiler/testData/diagnostics/nativeTests/throwsClash.kt @@ -4,7 +4,7 @@ package kotlin import kotlin.reflect.KClass -@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.CONSTRUCTOR) +@Target(AnnotationTarget.FUNCTION, AnnotationTarget.CONSTRUCTOR) @Retention(AnnotationRetention.SOURCE) public annotation class Throws(vararg val ThrowableClasses: KClass) diff --git a/compiler/testData/diagnostics/nativeTests/throwsClash.txt b/compiler/testData/diagnostics/nativeTests/throwsClash.txt index ed367a010a9..b7d39e628b1 100644 --- a/compiler/testData/diagnostics/nativeTests/throwsClash.txt +++ b/compiler/testData/diagnostics/nativeTests/throwsClash.txt @@ -83,7 +83,7 @@ package abc9 { package kotlin { - @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.CONSTRUCTOR}) @kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) public final annotation class Throws : kotlin.Annotation { + @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.CONSTRUCTOR}) @kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) public final annotation class Throws : kotlin.Annotation { public constructor Throws(/*0*/ vararg ThrowableClasses: kotlin.reflect.KClass /*kotlin.Array>*/) public final val ThrowableClasses: kotlin.Array> public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean