From 513b27f65fb572fd9ebb1371f4913f8b479023e5 Mon Sep 17 00:00:00 2001 From: Mikhail Zarechenskiy Date: Thu, 5 Jul 2018 23:45:59 +0300 Subject: [PATCH] Make tests about varargs compatible with 1.2 and 1.3 versions --- .../tests/checkArguments/SpreadVarargs.kt | 9 +-- .../collectionLiteralsWithVarargs.kt | 4 +- .../varargsInDifferentPositions.kt | 3 +- .../resolve/overloadConflicts/varargsMixed.kt | 5 +- ...tSingleArrayElementAsVarargInAnnotation.kt | 2 +- ...leArrayElementAsVarargInAnnotationError.kt | 2 +- ...ElementsInNamedFormAnnDeprecation_after.kt | 30 ++++++++++ ...ementsInNamedFormAnnDeprecation_after.txt} | 0 ...ementsInNamedFormAnnDeprecation_before.kt} | 2 +- ...ementsInNamedFormAnnDeprecation_before.txt | 25 ++++++++ ...ElementsInNamedFormFunDeprecation_after.kt | 60 +++++++++++++++++++ ...ementsInNamedFormFunDeprecation_after.txt} | 0 ...ementsInNamedFormFunDeprecation_before.kt} | 2 +- ...ementsInNamedFormFunDeprecation_before.txt | 18 ++++++ ...ibitAssigningSingleElementsInNamedForm.txt | 22 +++++++ .../checkers/DiagnosticsTestGenerated.java | 22 +++++-- .../DiagnosticsUsingJavacTestGenerated.java | 22 +++++-- 17 files changed, 203 insertions(+), 25 deletions(-) create mode 100644 compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_after.kt rename compiler/testData/diagnostics/tests/varargs/{assigningSingleElementsInNamedFormAnnDeprecation.txt => assigningSingleElementsInNamedFormAnnDeprecation_after.txt} (100%) rename compiler/testData/diagnostics/tests/varargs/{assigningSingleElementsInNamedFormAnnDeprecation.kt => assigningSingleElementsInNamedFormAnnDeprecation_before.kt} (90%) create mode 100644 compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_before.txt create mode 100644 compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_after.kt rename compiler/testData/diagnostics/tests/varargs/{assigningSingleElementsInNamedFormFunDeprecation.txt => assigningSingleElementsInNamedFormFunDeprecation_after.txt} (100%) rename compiler/testData/diagnostics/tests/varargs/{assigningSingleElementsInNamedFormFunDeprecation.kt => assigningSingleElementsInNamedFormFunDeprecation_before.kt} (95%) create mode 100644 compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_before.txt create mode 100644 compiler/testData/diagnostics/tests/varargs/prohibitAssigningSingleElementsInNamedForm.txt diff --git a/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt b/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt index 9e5c2ddcb98..1c299776ea8 100644 --- a/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt +++ b/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt @@ -1,5 +1,6 @@ // !WITH_NEW_INFERENCE // !CHECK_TYPE +// !LANGUAGE: +ProhibitAssigningSingleElementsToVarargsInNamedForm fun array1(vararg a : T) = a @@ -11,7 +12,7 @@ fun main(args : Array) { join(1, "2", "3") join(*1, "2") join(1, *"2") - join(x = 1, a = "2") + join(x = 1, a = "2") join(x = *1, a = *"2") join(x = 1, a = *a) join(x = 1, a = *b) @@ -26,13 +27,13 @@ fun main(args : Array) { join(1, "4", *a, *b, "3") join(a = *a, x = 1) join(a = *b, x = 1) - join(a = a, x = 1) + join(a = a, x = 1) joinG(1, "2") joinG(*1, "2") joinG(1, *"2") joinG(x = 1, a = *a) - joinG(x = 1, a = "2") + joinG(x = 1, a = "2") joinG(x = *1, a = *"2") joinG(1, *a) joinG(1, *a, "3") @@ -45,7 +46,7 @@ fun main(args : Array) { joinG(*1, "2") joinG(1, *"2") joinG(x = 1, a = *a) - joinG(x = 1, a = "2") + joinG(x = 1, a = "2") joinG(x = *1, a = *"2") joinG(1, *a) joinG(1, *a, "3") diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt b/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt index 33b2707243c..a612614ae94 100644 --- a/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt +++ b/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt @@ -1,5 +1,5 @@ // !WITH_NEW_INFERENCE -// !LANGUAGE: +ArrayLiteralsInAnnotations +// !LANGUAGE: +ArrayLiteralsInAnnotations, +ProhibitAssigningSingleElementsToVarargsInNamedForm annotation class Ann1(vararg val a: String = []) annotation class Ann2(vararg val a: Int = [1, 2]) @@ -23,7 +23,7 @@ fun test1_2() {} @Ann2(*[]) fun test2() {} -@Ann3(a = *[0f, 1 / 0f]) +@Ann3(a = *[0f, 1 / 0f]) fun test3() {} @Ann5(Ann4(*["/"])) diff --git a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsInDifferentPositions.kt b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsInDifferentPositions.kt index 12885accb55..0abd0d74549 100644 --- a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsInDifferentPositions.kt +++ b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsInDifferentPositions.kt @@ -1,3 +1,4 @@ +// !LANGUAGE: +ProhibitAssigningSingleElementsToVarargsInNamedForm // !DIAGNOSTICS: -UNUSED_PARAMETER object X1 @@ -7,6 +8,6 @@ fun overloadedFun(arg: String, vararg args: String) = X1 fun overloadedFun(arg: String, vararg args: String, flag: Boolean = true) = X2 val test1a: X1 = overloadedFun("", "") -val test1b: X1 = overloadedFun("", args = "") +val test1b: X1 = overloadedFun("", args = "") val test1c: X2 = overloadedFun("", "", "", flag = true) diff --git a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsMixed.kt b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsMixed.kt index e1475d985ce..4470eab6469 100644 --- a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsMixed.kt +++ b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsMixed.kt @@ -1,3 +1,4 @@ +// !LANGUAGE: +ProhibitAssigningSingleElementsToVarargsInNamedForm // !DIAGNOSTICS: -UNUSED_PARAMETER object X1 @@ -8,5 +9,5 @@ fun overloadedFun5(s: String, vararg ss: String) = X2 val test1 = overloadedFun5("") val test2 = overloadedFun5("", "") -val test3: X2 = overloadedFun5(s = "", ss = "") -val test4: X1 = overloadedFun5(ss = "") \ No newline at end of file +val test3: X2 = overloadedFun5(s = "", ss = "") +val test4: X1 = overloadedFun5(ss = "") \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/varargs/assignNonConstSingleArrayElementAsVarargInAnnotation.kt b/compiler/testData/diagnostics/tests/varargs/assignNonConstSingleArrayElementAsVarargInAnnotation.kt index 6c91a7167ff..9a44b65c547 100644 --- a/compiler/testData/diagnostics/tests/varargs/assignNonConstSingleArrayElementAsVarargInAnnotation.kt +++ b/compiler/testData/diagnostics/tests/varargs/assignNonConstSingleArrayElementAsVarargInAnnotation.kt @@ -1,4 +1,4 @@ -// !LANGUAGE: -ProhibitNonConstValuesAsVarargsInAnnotations +// !LANGUAGE: -ProhibitNonConstValuesAsVarargsInAnnotations, -ProhibitAssigningSingleElementsToVarargsInNamedForm val nonConstArray = longArrayOf(0) fun nonConstFun(): LongArray = TODO() diff --git a/compiler/testData/diagnostics/tests/varargs/assignNonConstSingleArrayElementAsVarargInAnnotationError.kt b/compiler/testData/diagnostics/tests/varargs/assignNonConstSingleArrayElementAsVarargInAnnotationError.kt index 42c7d800502..e80635bdca9 100644 --- a/compiler/testData/diagnostics/tests/varargs/assignNonConstSingleArrayElementAsVarargInAnnotationError.kt +++ b/compiler/testData/diagnostics/tests/varargs/assignNonConstSingleArrayElementAsVarargInAnnotationError.kt @@ -1,4 +1,4 @@ -// !LANGUAGE: +ProhibitNonConstValuesAsVarargsInAnnotations +// !LANGUAGE: +ProhibitNonConstValuesAsVarargsInAnnotations, +ProhibitAssigningSingleElementsToVarargsInNamedForm val nonConstArray = longArrayOf(0) fun nonConstFun(): LongArray = TODO() diff --git a/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_after.kt b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_after.kt new file mode 100644 index 00000000000..f60aff3075a --- /dev/null +++ b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_after.kt @@ -0,0 +1,30 @@ +// !LANGUAGE: +ArrayLiteralsInAnnotations, +AssigningArraysToVarargsInNamedFormInAnnotations, +ProhibitAssigningSingleElementsToVarargsInNamedForm + +// FILE: JavaAnn.java + +@interface JavaAnn { + String[] value() default {}; + String[] path() default {}; +} + +// FILE: test.kt + +annotation class Ann(vararg val s: String) + +@Ann(s = "value") +fun test1() {} + +@Ann(s = *arrayOf("value")) +fun test2() {} + +@Ann(s = *["value"]) +fun test3() {} + +@JavaAnn(value = "value") +fun test4() {} + +@JavaAnn("value", path = arrayOf("path")) +fun test5() {} + +@JavaAnn("value", path = ["path"]) +fun test6() {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation.txt b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_after.txt similarity index 100% rename from compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation.txt rename to compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_after.txt diff --git a/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation.kt b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_before.kt similarity index 90% rename from compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation.kt rename to compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_before.kt index ed5bb6d1dd7..ef4e1522d4e 100644 --- a/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation.kt +++ b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_before.kt @@ -1,4 +1,4 @@ -// !LANGUAGE: +ArrayLiteralsInAnnotations, +AssigningArraysToVarargsInNamedFormInAnnotations +// !LANGUAGE: +ArrayLiteralsInAnnotations, +AssigningArraysToVarargsInNamedFormInAnnotations, -ProhibitAssigningSingleElementsToVarargsInNamedForm // FILE: JavaAnn.java diff --git a/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_before.txt b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_before.txt new file mode 100644 index 00000000000..40d972d6350 --- /dev/null +++ b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_before.txt @@ -0,0 +1,25 @@ +package + +@Ann(s = {"value"}) public fun test1(): kotlin.Unit +@Ann(s = {"value"}) public fun test2(): kotlin.Unit +@Ann(s = {"value"}) public fun test3(): kotlin.Unit +@JavaAnn(value = {"value"}) public fun test4(): kotlin.Unit +@JavaAnn(path = {"path"}, value = {"value"}) public fun test5(): kotlin.Unit +@JavaAnn(path = {"path"}, value = {"value"}) public fun test6(): kotlin.Unit + +public final annotation class Ann : kotlin.Annotation { + public constructor Ann(/*0*/ vararg s: kotlin.String /*kotlin.Array*/) + public final val s: kotlin.Array + 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/*package*/ final annotation class JavaAnn : kotlin.Annotation { + public/*package*/ constructor JavaAnn(/*0*/ vararg value: kotlin.String /*kotlin.Array*/ = ..., /*1*/ path: kotlin.Array = ...) + public final val path: kotlin.Array + public final val value: kotlin.Array + 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/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_after.kt b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_after.kt new file mode 100644 index 00000000000..2144350eca1 --- /dev/null +++ b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_after.kt @@ -0,0 +1,60 @@ +// !LANGUAGE: +AssigningArraysToVarargsInNamedFormInAnnotations, +ProhibitAssigningSingleElementsToVarargsInNamedForm +// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE +// !WITH_NEW_INFERENCE + +fun foo(vararg s: Int) {} + +open class Cls(vararg p: Long) + +fun test(i: IntArray) { + foo(s = 1) + foo(s = i) + foo(s = *i) + foo(s = intArrayOf(1)) + foo(s = *intArrayOf(1)) + foo(1) + + Cls(p = 1) + + class Sub : Cls(p = 1) + + val c = object : Cls(p = 1) {} + + foo(s = *intArrayOf(elements = 1)) +} + + +fun anyFoo(vararg a: Any) {} + +fun testAny() { + anyFoo(a = "") + anyFoo(a = arrayOf("")) + anyFoo(a = *arrayOf("")) +} + +fun genFoo(vararg t: T) {} + +fun testGen() { + genFoo(t = 1) + genFoo(t = null) + genFoo>(t = arrayOf()) + genFoo>(t = *arrayOf(arrayOf())) + + genFoo(t = "") + genFoo(t = arrayOf("")) + genFoo(t = *arrayOf("")) +} + +fun manyFoo(vararg v: Int) {} +fun manyFoo(vararg s: String) {} + +fun testMany(a: Any) { + manyFoo(v = 1) + manyFoo(s = "") + + manyFoo(a) + manyFoo(v = a) + manyFoo(s = a) + manyFoo(v = a as Int) + manyFoo(s = a as String) +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation.txt b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_after.txt similarity index 100% rename from compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation.txt rename to compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_after.txt diff --git a/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation.kt b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_before.kt similarity index 95% rename from compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation.kt rename to compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_before.kt index 9b568771189..3ec91aa8778 100644 --- a/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation.kt +++ b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_before.kt @@ -1,4 +1,4 @@ -// !LANGUAGE: +AssigningArraysToVarargsInNamedFormInAnnotations +// !LANGUAGE: +AssigningArraysToVarargsInNamedFormInAnnotations, -ProhibitAssigningSingleElementsToVarargsInNamedForm // !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE // !WITH_NEW_INFERENCE diff --git a/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_before.txt b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_before.txt new file mode 100644 index 00000000000..edd84af1bfa --- /dev/null +++ b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_before.txt @@ -0,0 +1,18 @@ +package + +public fun anyFoo(/*0*/ vararg a: kotlin.Any /*kotlin.Array*/): kotlin.Unit +public fun foo(/*0*/ vararg s: kotlin.Int /*kotlin.IntArray*/): kotlin.Unit +public fun genFoo(/*0*/ vararg t: T /*kotlin.Array*/): kotlin.Unit +public fun manyFoo(/*0*/ vararg s: kotlin.String /*kotlin.Array*/): kotlin.Unit +public fun manyFoo(/*0*/ vararg v: kotlin.Int /*kotlin.IntArray*/): kotlin.Unit +public fun test(/*0*/ i: kotlin.IntArray): kotlin.Unit +public fun testAny(): kotlin.Unit +public fun testGen(): kotlin.Unit +public fun testMany(/*0*/ a: kotlin.Any): kotlin.Unit + +public open class Cls { + public constructor Cls(/*0*/ vararg p: kotlin.Long /*kotlin.LongArray*/) + 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/testData/diagnostics/tests/varargs/prohibitAssigningSingleElementsInNamedForm.txt b/compiler/testData/diagnostics/tests/varargs/prohibitAssigningSingleElementsInNamedForm.txt new file mode 100644 index 00000000000..25f1681a889 --- /dev/null +++ b/compiler/testData/diagnostics/tests/varargs/prohibitAssigningSingleElementsInNamedForm.txt @@ -0,0 +1,22 @@ +package + +@Anno1(s = {"foo"}) @Anno2(i = {1}) public fun f1(): kotlin.Unit +@Anno1(s = {"foo"}) @Anno2(i = {1}) public fun f2(): kotlin.Unit +public fun foo(/*0*/ vararg ints: kotlin.Int /*kotlin.IntArray*/): kotlin.Unit +public fun test(): kotlin.Unit + +public final annotation class Anno1 : kotlin.Annotation { + public constructor Anno1(/*0*/ vararg s: kotlin.String /*kotlin.Array*/) + public final val s: kotlin.Array + 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 annotation class Anno2 : kotlin.Annotation { + public constructor Anno2(/*0*/ vararg i: kotlin.Int /*kotlin.IntArray*/) + public final val i: kotlin.IntArray + 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 58fbf2abd0e..e5620dbdbaa 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java @@ -22065,14 +22065,24 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { runTest("compiler/testData/diagnostics/tests/varargs/assigningArraysToVarargsInAnnotations.kt"); } - @TestMetadata("assigningSingleElementsInNamedFormAnnDeprecation.kt") - public void testAssigningSingleElementsInNamedFormAnnDeprecation() throws Exception { - runTest("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation.kt"); + @TestMetadata("assigningSingleElementsInNamedFormAnnDeprecation_after.kt") + public void testAssigningSingleElementsInNamedFormAnnDeprecation_after() throws Exception { + runTest("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_after.kt"); } - @TestMetadata("assigningSingleElementsInNamedFormFunDeprecation.kt") - public void testAssigningSingleElementsInNamedFormFunDeprecation() throws Exception { - runTest("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation.kt"); + @TestMetadata("assigningSingleElementsInNamedFormAnnDeprecation_before.kt") + public void testAssigningSingleElementsInNamedFormAnnDeprecation_before() throws Exception { + runTest("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_before.kt"); + } + + @TestMetadata("assigningSingleElementsInNamedFormFunDeprecation_after.kt") + public void testAssigningSingleElementsInNamedFormFunDeprecation_after() throws Exception { + runTest("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_after.kt"); + } + + @TestMetadata("assigningSingleElementsInNamedFormFunDeprecation_before.kt") + public void testAssigningSingleElementsInNamedFormFunDeprecation_before() throws Exception { + runTest("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_before.kt"); } @TestMetadata("kt1781.kt") diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java index f2cab6ef692..a271d92d536 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java @@ -22065,14 +22065,24 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing runTest("compiler/testData/diagnostics/tests/varargs/assigningArraysToVarargsInAnnotations.kt"); } - @TestMetadata("assigningSingleElementsInNamedFormAnnDeprecation.kt") - public void testAssigningSingleElementsInNamedFormAnnDeprecation() throws Exception { - runTest("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation.kt"); + @TestMetadata("assigningSingleElementsInNamedFormAnnDeprecation_after.kt") + public void testAssigningSingleElementsInNamedFormAnnDeprecation_after() throws Exception { + runTest("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_after.kt"); } - @TestMetadata("assigningSingleElementsInNamedFormFunDeprecation.kt") - public void testAssigningSingleElementsInNamedFormFunDeprecation() throws Exception { - runTest("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation.kt"); + @TestMetadata("assigningSingleElementsInNamedFormAnnDeprecation_before.kt") + public void testAssigningSingleElementsInNamedFormAnnDeprecation_before() throws Exception { + runTest("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation_before.kt"); + } + + @TestMetadata("assigningSingleElementsInNamedFormFunDeprecation_after.kt") + public void testAssigningSingleElementsInNamedFormFunDeprecation_after() throws Exception { + runTest("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_after.kt"); + } + + @TestMetadata("assigningSingleElementsInNamedFormFunDeprecation_before.kt") + public void testAssigningSingleElementsInNamedFormFunDeprecation_before() throws Exception { + runTest("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_before.kt"); } @TestMetadata("kt1781.kt")