diff --git a/compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt26638.kt b/compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt26638.kt new file mode 100644 index 00000000000..0d89b156977 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt26638.kt @@ -0,0 +1,21 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER + +// Ann is not repeatable +annotation class Ann(val x: Int) + +@get:Ann(10) +val a: String + @Ann(20) get() = "foo" + +@set:Ann(10) +var b: String = "" + @Ann(20) set(value) { field = value } + +@setparam:Ann(10) +var c = " " + set(@Ann(20) x) {} + +@get:Ann(10) +@get:Ann(20) +val d: String + @Ann(30) @Ann(40) get() = "foo" \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt26638.txt b/compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt26638.txt new file mode 100644 index 00000000000..17e27f6efff --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt26638.txt @@ -0,0 +1,11 @@ +package + +@setparam:Ann(x = 20) @setparam:Ann(x = 10) public var a: kotlin.String + +public final annotation class Ann : kotlin.Annotation { + public constructor Ann(/*0*/ x: kotlin.Int) + public final val x: kotlin.Int + 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 5c2a028253e..daf07034f5f 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("kt26638.kt") + public void testKt26638() throws Exception { + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt26638.kt"); + } + @TestMetadata("ParamAnnotations.kt") public void testParamAnnotations() throws Exception { runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/ParamAnnotations.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java index 403f3dcdeb8..47099c94b9b 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("kt26638.kt") + public void testKt26638() throws Exception { + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/kt26638.kt"); + } + @TestMetadata("ParamAnnotations.kt") public void testParamAnnotations() throws Exception { runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/ParamAnnotations.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 889768c1dc8..8e419f91388 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -10618,6 +10618,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FieldRename extends AbstractLightAnalysisModeTest { + @TestMetadata("jvmFieldNoClash1.kt") + public void ignoreJvmFieldNoClash1() throws Exception { + runTest("compiler/testData/codegen/box/fieldRename/jvmFieldNoClash1.kt"); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @@ -10641,11 +10646,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/fieldRename/genericPropertyWithItself.kt"); } - @TestMetadata("jvmFieldNoClash1.kt") - public void testJvmFieldNoClash1() throws Exception { - runTest("compiler/testData/codegen/box/fieldRename/jvmFieldNoClash1.kt"); - } - @TestMetadata("jvmFieldNoClash2.kt") public void testJvmFieldNoClash2() throws Exception { runTest("compiler/testData/codegen/box/fieldRename/jvmFieldNoClash2.kt");