From 1fc6f30c50c39daed1bad6224d7bb57d89a8f613 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Thu, 21 Feb 2019 15:26:54 +0300 Subject: [PATCH] Add test for KT-23992 --- .../annotations/withUseSiteTarget/kt23992.kt | 5 +++++ .../annotations/withUseSiteTarget/kt23992.txt | 21 +++++++++++++++++++ .../checkers/DiagnosticsTestGenerated.java | 5 +++++ .../DiagnosticsUsingJavacTestGenerated.java | 5 +++++ 4 files changed, 36 insertions(+) create mode 100644 compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt23992.kt create mode 100644 compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt23992.txt diff --git a/compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt23992.kt b/compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt23992.kt new file mode 100644 index 00000000000..2a2a4ceb90a --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt23992.kt @@ -0,0 +1,5 @@ +interface Foo + +annotation class Ann + +class E : @field:Ann @get:Ann @set:Ann @setparam:Ann Foo \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt23992.txt b/compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt23992.txt new file mode 100644 index 00000000000..8f433672169 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt23992.txt @@ -0,0 +1,21 @@ +package + +public final annotation class Ann : kotlin.Annotation { + public constructor Ann() + 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 final class E : Foo { + public constructor E() + 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 interface Foo { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java index 8e248001f5f..db461d9cdf1 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java @@ -1444,6 +1444,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/GetterAnnotations.kt"); } + @TestMetadata("kt23992.kt") + public void testKt23992() throws Exception { + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt23992.kt"); + } + @TestMetadata("kt26638.kt") public void testKt26638() throws Exception { runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt26638.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java index e055be1294f..deeb0305993 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java @@ -1439,6 +1439,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/GetterAnnotations.kt"); } + @TestMetadata("kt23992.kt") + public void testKt23992() throws Exception { + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt23992.kt"); + } + @TestMetadata("kt26638.kt") public void testKt26638() throws Exception { runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt26638.kt");