[tests] Add tests for conflicting overloads + hidden between open/final
This commit is contained in:
+12
@@ -27207,6 +27207,18 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden"), Pattern.compile("^(.+)\\.(kt|kts)$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden"), Pattern.compile("^(.+)\\.(kt|kts)$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ConflictingOverloadsFunsDifferentReturnInClass.kt")
|
||||||
|
public void testConflictingOverloadsFunsDifferentReturnInClass() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConflictingOverloadsFunsDifferentReturnInClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ConflictingOverloadsIdenticalFunsInClass.kt")
|
||||||
|
public void testConflictingOverloadsIdenticalFunsInClass() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConflictingOverloadsIdenticalFunsInClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("ConflictingOverloadsIdenticalValsInClass.kt")
|
@TestMetadata("ConflictingOverloadsIdenticalValsInClass.kt")
|
||||||
public void testConflictingOverloadsIdenticalValsInClass() throws Exception {
|
public void testConflictingOverloadsIdenticalValsInClass() throws Exception {
|
||||||
|
|||||||
+12
@@ -27207,6 +27207,18 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden"), Pattern.compile("^(.+)\\.(kt|kts)$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden"), Pattern.compile("^(.+)\\.(kt|kts)$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ConflictingOverloadsFunsDifferentReturnInClass.kt")
|
||||||
|
public void testConflictingOverloadsFunsDifferentReturnInClass() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConflictingOverloadsFunsDifferentReturnInClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ConflictingOverloadsIdenticalFunsInClass.kt")
|
||||||
|
public void testConflictingOverloadsIdenticalFunsInClass() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConflictingOverloadsIdenticalFunsInClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("ConflictingOverloadsIdenticalValsInClass.kt")
|
@TestMetadata("ConflictingOverloadsIdenticalValsInClass.kt")
|
||||||
public void testConflictingOverloadsIdenticalValsInClass() throws Exception {
|
public void testConflictingOverloadsIdenticalValsInClass() throws Exception {
|
||||||
|
|||||||
+12
@@ -25141,6 +25141,18 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ConflictingOverloadsFunsDifferentReturnInClass.kt")
|
||||||
|
public void testConflictingOverloadsFunsDifferentReturnInClass() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConflictingOverloadsFunsDifferentReturnInClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ConflictingOverloadsIdenticalFunsInClass.kt")
|
||||||
|
public void testConflictingOverloadsIdenticalFunsInClass() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConflictingOverloadsIdenticalFunsInClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("ConflictingOverloadsIdenticalValsInClass.kt")
|
@TestMetadata("ConflictingOverloadsIdenticalValsInClass.kt")
|
||||||
public void testConflictingOverloadsIdenticalValsInClass() throws Exception {
|
public void testConflictingOverloadsIdenticalValsInClass() throws Exception {
|
||||||
|
|||||||
+12
@@ -25147,6 +25147,18 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ConflictingOverloadsFunsDifferentReturnInClass.kt")
|
||||||
|
public void testConflictingOverloadsFunsDifferentReturnInClass() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConflictingOverloadsFunsDifferentReturnInClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ConflictingOverloadsIdenticalFunsInClass.kt")
|
||||||
|
public void testConflictingOverloadsIdenticalFunsInClass() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConflictingOverloadsIdenticalFunsInClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("ConflictingOverloadsIdenticalValsInClass.kt")
|
@TestMetadata("ConflictingOverloadsIdenticalValsInClass.kt")
|
||||||
public void testConflictingOverloadsIdenticalValsInClass() throws Exception {
|
public void testConflictingOverloadsIdenticalValsInClass() throws Exception {
|
||||||
|
|||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
class A {
|
||||||
|
fun a(a: Int): Int = 0
|
||||||
|
|
||||||
|
@Deprecated("a", level = DeprecationLevel.HIDDEN) fun a(a: Int) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class B {
|
||||||
|
<!CONFLICTING_OVERLOADS!>open fun a(a: Int): Int<!> = 0
|
||||||
|
|
||||||
|
<!CONFLICTING_OVERLOADS!>@Deprecated("a", level = DeprecationLevel.HIDDEN) fun a(a: Int)<!> {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class C {
|
||||||
|
<!CONFLICTING_OVERLOADS!>fun a(a: Int): Int<!> = 0
|
||||||
|
|
||||||
|
<!CONFLICTING_OVERLOADS!>@Deprecated("a", level = DeprecationLevel.HIDDEN) open fun a(a: Int)<!> {
|
||||||
|
}
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
class A {
|
||||||
|
<!CONFLICTING_OVERLOADS!>fun a(a: Int): Int<!> = 0
|
||||||
|
|
||||||
|
<!CONFLICTING_OVERLOADS!>@Deprecated("a", level = DeprecationLevel.HIDDEN) fun a(a: Int)<!> {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class B {
|
||||||
|
<!CONFLICTING_OVERLOADS!>open fun a(a: Int): Int<!> = 0
|
||||||
|
|
||||||
|
<!CONFLICTING_OVERLOADS!>@Deprecated("a", level = DeprecationLevel.HIDDEN) fun a(a: Int)<!> {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class C {
|
||||||
|
<!CONFLICTING_OVERLOADS!>fun a(a: Int): Int<!> = 0
|
||||||
|
|
||||||
|
<!CONFLICTING_OVERLOADS!>@Deprecated("a", level = DeprecationLevel.HIDDEN) open fun a(a: Int)<!> {
|
||||||
|
}
|
||||||
|
}
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public final class A {
|
||||||
|
public constructor A()
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "a") public final fun a(/*0*/ a: kotlin.Int): kotlin.Unit
|
||||||
|
public final fun a(/*0*/ a: kotlin.Int): 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
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class B {
|
||||||
|
public constructor B()
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "a") public final fun a(/*0*/ a: kotlin.Int): kotlin.Unit
|
||||||
|
public open fun a(/*0*/ a: kotlin.Int): 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
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class C {
|
||||||
|
public constructor C()
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "a") public open fun a(/*0*/ a: kotlin.Int): kotlin.Unit
|
||||||
|
public final fun a(/*0*/ a: kotlin.Int): 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
|
||||||
|
}
|
||||||
|
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
class A() {
|
||||||
|
fun b() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated("a", level = DeprecationLevel.HIDDEN) fun b() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class B() {
|
||||||
|
<!CONFLICTING_OVERLOADS!>open fun b()<!> {
|
||||||
|
}
|
||||||
|
|
||||||
|
<!CONFLICTING_OVERLOADS!>@Deprecated("a", level = DeprecationLevel.HIDDEN) fun b()<!> {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class C() {
|
||||||
|
<!CONFLICTING_OVERLOADS!>fun b()<!> {
|
||||||
|
}
|
||||||
|
|
||||||
|
<!CONFLICTING_OVERLOADS!>@Deprecated("a", level = DeprecationLevel.HIDDEN) open fun b()<!> {
|
||||||
|
}
|
||||||
|
}
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
class A() {
|
||||||
|
<!CONFLICTING_OVERLOADS!>fun b()<!> {
|
||||||
|
}
|
||||||
|
|
||||||
|
<!CONFLICTING_OVERLOADS!>@Deprecated("a", level = DeprecationLevel.HIDDEN) fun b()<!> {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class B() {
|
||||||
|
<!CONFLICTING_OVERLOADS!>open fun b()<!> {
|
||||||
|
}
|
||||||
|
|
||||||
|
<!CONFLICTING_OVERLOADS!>@Deprecated("a", level = DeprecationLevel.HIDDEN) fun b()<!> {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class C() {
|
||||||
|
<!CONFLICTING_OVERLOADS!>fun b()<!> {
|
||||||
|
}
|
||||||
|
|
||||||
|
<!CONFLICTING_OVERLOADS!>@Deprecated("a", level = DeprecationLevel.HIDDEN) open fun b()<!> {
|
||||||
|
}
|
||||||
|
}
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public final class A {
|
||||||
|
public constructor A()
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "a") public final fun b(): kotlin.Unit
|
||||||
|
public final fun b(): kotlin.Unit
|
||||||
|
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 open class B {
|
||||||
|
public constructor B()
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "a") public final fun b(): kotlin.Unit
|
||||||
|
public open fun b(): kotlin.Unit
|
||||||
|
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 open class C {
|
||||||
|
public constructor C()
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "a") public open fun b(): kotlin.Unit
|
||||||
|
public final fun b(): kotlin.Unit
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
Generated
+12
@@ -27207,6 +27207,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ConflictingOverloadsFunsDifferentReturnInClass.kt")
|
||||||
|
public void testConflictingOverloadsFunsDifferentReturnInClass() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConflictingOverloadsFunsDifferentReturnInClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ConflictingOverloadsIdenticalFunsInClass.kt")
|
||||||
|
public void testConflictingOverloadsIdenticalFunsInClass() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConflictingOverloadsIdenticalFunsInClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("ConflictingOverloadsIdenticalValsInClass.kt")
|
@TestMetadata("ConflictingOverloadsIdenticalValsInClass.kt")
|
||||||
public void testConflictingOverloadsIdenticalValsInClass() throws Exception {
|
public void testConflictingOverloadsIdenticalValsInClass() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user