From 6f622920e711d8d83e2bf7a7c2a7e8373f35104f Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Mon, 21 Sep 2020 18:46:21 +0200 Subject: [PATCH] Minor, deduplicate matching JVM_OLD/JVM_IR duplicateJvmSignature tests --- ...TwoTraits_ir.kt => delegateToTwoTraits.kt} | 3 +-- ...oTraits_ir.txt => delegateToTwoTraits.txt} | 0 .../erasure/delegateToTwoTraits_old.kt | 15 ----------- .../erasure/delegateToTwoTraits_old.txt | 24 ------------------ ...Method_ir.kt => delegationAndOwnMethod.kt} | 3 +-- ...thod_ir.txt => delegationAndOwnMethod.txt} | 0 .../erasure/delegationAndOwnMethod_old.kt | 10 -------- .../erasure/delegationAndOwnMethod_old.txt | 17 ------------- ...t => delegationToTraitImplAndOwnMethod.kt} | 3 +-- ... => delegationToTraitImplAndOwnMethod.txt} | 0 .../delegationToTraitImplAndOwnMethod_old.kt | 16 ------------ .../delegationToTraitImplAndOwnMethod_old.txt | 25 ------------------- ...gnosticsTestWithJvmIrBackendGenerated.java | 18 ++++++------- ...nosticsTestWithOldJvmBackendGenerated.java | 18 ++++++------- 14 files changed, 21 insertions(+), 131 deletions(-) rename compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/{delegateToTwoTraits_ir.kt => delegateToTwoTraits.kt} (90%) rename compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/{delegateToTwoTraits_ir.txt => delegateToTwoTraits.txt} (100%) delete mode 100644 compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits_old.kt delete mode 100644 compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits_old.txt rename compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/{delegationAndOwnMethod_ir.kt => delegationAndOwnMethod.kt} (89%) rename compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/{delegationAndOwnMethod_ir.txt => delegationAndOwnMethod.txt} (100%) delete mode 100644 compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod_old.kt delete mode 100644 compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod_old.txt rename compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/{delegationToTraitImplAndOwnMethod_ir.kt => delegationToTraitImplAndOwnMethod.kt} (92%) rename compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/{delegationToTraitImplAndOwnMethod_ir.txt => delegationToTraitImplAndOwnMethod.txt} (100%) delete mode 100644 compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod_old.kt delete mode 100644 compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod_old.txt diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits_ir.kt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits.kt similarity index 90% rename from compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits_ir.kt rename to compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits.kt index 6912654a04b..3a71b9296d1 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits_ir.kt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits.kt @@ -1,5 +1,4 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -// TARGET_BACKEND: JVM_IR interface Foo { fun foo(l: List) @@ -12,4 +11,4 @@ interface Bar { class Baz(f: Foo, b: Bar) : Foo by f, Bar by b { -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits_ir.txt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits.txt similarity index 100% rename from compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits_ir.txt rename to compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits.txt diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits_old.kt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits_old.kt deleted file mode 100644 index 47879e19d9a..00000000000 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits_old.kt +++ /dev/null @@ -1,15 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -// TARGET_BACKEND: JVM_OLD - -interface Foo { - fun foo(l: List) -} - -interface Bar { - fun foo(l: List) -} - -class Baz(f: Foo, b: Bar) : - Foo by f, - Bar by b { -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits_old.txt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits_old.txt deleted file mode 100644 index 5464b583585..00000000000 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits_old.txt +++ /dev/null @@ -1,24 +0,0 @@ -package - -public interface Bar { - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public abstract fun foo(/*0*/ l: kotlin.collections.List): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class Baz : Foo, Bar { - public constructor Baz(/*0*/ f: Foo, /*1*/ b: Bar) - public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*delegation*/ fun foo(/*0*/ l: kotlin.collections.List): kotlin.Unit - public open override /*1*/ /*delegation*/ fun foo(/*0*/ l: kotlin.collections.List): kotlin.Unit - public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String -} - -public interface Foo { - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public abstract fun foo(/*0*/ l: kotlin.collections.List): kotlin.Unit - 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/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod_ir.kt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod.kt similarity index 89% rename from compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod_ir.kt rename to compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod.kt index 5fac2b426fe..6f79f5982e9 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod_ir.kt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod.kt @@ -1,5 +1,4 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -// TARGET_BACKEND: JVM_IR interface Foo { fun foo(l: List) @@ -7,4 +6,4 @@ interface Foo { class Bar(f: Foo): Foo by f { fun foo(l: List) {} -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod_ir.txt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod.txt similarity index 100% rename from compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod_ir.txt rename to compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod.txt diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod_old.kt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod_old.kt deleted file mode 100644 index c30257f55b7..00000000000 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod_old.kt +++ /dev/null @@ -1,10 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -// TARGET_BACKEND: JVM_OLD - -interface Foo { - fun foo(l: List) -} - -class Bar(f: Foo): Foo by f { - fun foo(l: List) {} -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod_old.txt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod_old.txt deleted file mode 100644 index f68841dd916..00000000000 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod_old.txt +++ /dev/null @@ -1,17 +0,0 @@ -package - -public final class Bar : Foo { - public constructor Bar(/*0*/ f: Foo) - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final fun foo(/*0*/ l: kotlin.collections.List): kotlin.Unit - public open override /*1*/ /*delegation*/ fun foo(/*0*/ l: kotlin.collections.List): kotlin.Unit - 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 abstract fun foo(/*0*/ l: kotlin.collections.List): kotlin.Unit - 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/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod_ir.kt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod.kt similarity index 92% rename from compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod_ir.kt rename to compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod.kt index 9757a6ff8b8..3c1d75b4ebc 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod_ir.kt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod.kt @@ -1,5 +1,4 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -// TARGET_BACKEND: JVM_IR interface Foo { fun foo(l: List) { @@ -13,4 +12,4 @@ class Bar(f: Foo): Foo by f { class BarOther(f: Foo): Foo by f { override fun foo(l: List) {} -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod_ir.txt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod.txt similarity index 100% rename from compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod_ir.txt rename to compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod.txt diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod_old.kt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod_old.kt deleted file mode 100644 index 6c18ecc60cd..00000000000 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod_old.kt +++ /dev/null @@ -1,16 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -// TARGET_BACKEND: JVM_OLD - -interface Foo { - fun foo(l: List) { - - } -} - -class Bar(f: Foo): Foo by f { - fun foo(l: List) {} -} - -class BarOther(f: Foo): Foo by f { - override fun foo(l: List) {} -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod_old.txt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod_old.txt deleted file mode 100644 index fefea99f460..00000000000 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod_old.txt +++ /dev/null @@ -1,25 +0,0 @@ -package - -public final class Bar : Foo { - public constructor Bar(/*0*/ f: Foo) - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final fun foo(/*0*/ l: kotlin.collections.List): kotlin.Unit - public open override /*1*/ /*delegation*/ fun foo(/*0*/ l: kotlin.collections.List): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class BarOther : Foo { - public constructor BarOther(/*0*/ f: Foo) - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ fun foo(/*0*/ l: kotlin.collections.List): kotlin.Unit - 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 fun foo(/*0*/ l: kotlin.collections.List): kotlin.Unit - 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/DiagnosticsTestWithJvmIrBackendGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithJvmIrBackendGenerated.java index cdd1e2f3124..e0cd9473b27 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithJvmIrBackendGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithJvmIrBackendGenerated.java @@ -204,19 +204,19 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/collections.kt"); } - @TestMetadata("delegateToTwoTraits_ir.kt") - public void testDelegateToTwoTraits_ir() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits_ir.kt"); + @TestMetadata("delegateToTwoTraits.kt") + public void testDelegateToTwoTraits() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits.kt"); } - @TestMetadata("delegationAndOwnMethod_ir.kt") - public void testDelegationAndOwnMethod_ir() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod_ir.kt"); + @TestMetadata("delegationAndOwnMethod.kt") + public void testDelegationAndOwnMethod() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod.kt"); } - @TestMetadata("delegationToTraitImplAndOwnMethod_ir.kt") - public void testDelegationToTraitImplAndOwnMethod_ir() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod_ir.kt"); + @TestMetadata("delegationToTraitImplAndOwnMethod.kt") + public void testDelegationToTraitImplAndOwnMethod() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod.kt"); } @TestMetadata("extensionProperties.kt") diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithOldJvmBackendGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithOldJvmBackendGenerated.java index ef4a69e370c..8589ffca787 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithOldJvmBackendGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithOldJvmBackendGenerated.java @@ -194,19 +194,19 @@ public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosti runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/collections.kt"); } - @TestMetadata("delegateToTwoTraits_old.kt") - public void testDelegateToTwoTraits_old() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits_old.kt"); + @TestMetadata("delegateToTwoTraits.kt") + public void testDelegateToTwoTraits() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits.kt"); } - @TestMetadata("delegationAndOwnMethod_old.kt") - public void testDelegationAndOwnMethod_old() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod_old.kt"); + @TestMetadata("delegationAndOwnMethod.kt") + public void testDelegationAndOwnMethod() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod.kt"); } - @TestMetadata("delegationToTraitImplAndOwnMethod_old.kt") - public void testDelegationToTraitImplAndOwnMethod_old() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod_old.kt"); + @TestMetadata("delegationToTraitImplAndOwnMethod.kt") + public void testDelegationToTraitImplAndOwnMethod() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod.kt"); } @TestMetadata("extensionProperties.kt")