Add tests for KT-26141 (yet without changes)
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
// !LANGUAGE: +MultiPlatformProjects
|
||||||
|
// MODULE: m1-common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
expect sealed class Presence {
|
||||||
|
object Online: <!JVM:SEALED_SUPERTYPE!>Presence<!>
|
||||||
|
object Offline: <!JVM:SEALED_SUPERTYPE!>Presence<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
// MODULE: m2-jvm(m1-common)
|
||||||
|
// FILE: jvm.kt
|
||||||
|
|
||||||
|
actual typealias Presence = P
|
||||||
|
sealed class P {
|
||||||
|
object Online : P()
|
||||||
|
object Offline : P()
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
// -- Module: <m1-common> --
|
||||||
|
package
|
||||||
|
|
||||||
|
public sealed expect class Presence {
|
||||||
|
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 expect object Offline : Presence {
|
||||||
|
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 expect object Online : Presence {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// -- Module: <m2-jvm> --
|
||||||
|
package
|
||||||
|
|
||||||
|
public sealed class P {
|
||||||
|
private constructor P()
|
||||||
|
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 object Offline : P {
|
||||||
|
private constructor Offline()
|
||||||
|
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 object Online : P {
|
||||||
|
private constructor Online()
|
||||||
|
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 actual typealias Presence = P
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// !LANGUAGE: +MultiPlatformProjects
|
||||||
|
// MODULE: m1-common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
expect sealed class Presence
|
||||||
|
expect object Online: Presence
|
||||||
|
expect object Offline: Presence
|
||||||
|
|
||||||
|
|
||||||
|
// MODULE: m2-jvm(m1-common)
|
||||||
|
// FILE: jvm.kt
|
||||||
|
|
||||||
|
actual typealias Presence = P
|
||||||
|
sealed class P
|
||||||
|
actual object Online : P()
|
||||||
|
actual object Offline : P()
|
||||||
+46
@@ -0,0 +1,46 @@
|
|||||||
|
// -- Module: <m1-common> --
|
||||||
|
package
|
||||||
|
|
||||||
|
public expect object Offline : Presence {
|
||||||
|
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 expect object Online : Presence {
|
||||||
|
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 sealed expect class Presence {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// -- Module: <m2-jvm> --
|
||||||
|
package
|
||||||
|
|
||||||
|
public actual object Offline : P {
|
||||||
|
private constructor Offline()
|
||||||
|
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 actual object Online : P {
|
||||||
|
private constructor Online()
|
||||||
|
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 sealed class P {
|
||||||
|
private constructor P()
|
||||||
|
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 actual typealias Presence = P
|
||||||
@@ -12954,6 +12954,16 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/multiplatform/privateTopLevelDeclarations.kt");
|
runTest("compiler/testData/diagnostics/tests/multiplatform/privateTopLevelDeclarations.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("sealedTypeAlias.kt")
|
||||||
|
public void testSealedTypeAlias() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/multiplatform/sealedTypeAlias.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("sealedTypeAliasTopLevel.kt")
|
||||||
|
public void testSealedTypeAliasTopLevel() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/multiplatform/sealedTypeAliasTopLevel.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments")
|
@TestMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
Generated
+10
@@ -12954,6 +12954,16 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
|||||||
runTest("compiler/testData/diagnostics/tests/multiplatform/privateTopLevelDeclarations.kt");
|
runTest("compiler/testData/diagnostics/tests/multiplatform/privateTopLevelDeclarations.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("sealedTypeAlias.kt")
|
||||||
|
public void testSealedTypeAlias() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/multiplatform/sealedTypeAlias.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("sealedTypeAliasTopLevel.kt")
|
||||||
|
public void testSealedTypeAliasTopLevel() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/multiplatform/sealedTypeAliasTopLevel.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments")
|
@TestMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
package p
|
||||||
|
|
||||||
|
expect sealed class Presence {
|
||||||
|
object Online: Presence
|
||||||
|
object Offline: Presence
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
// !CHECK_HIGHLIGHTING
|
||||||
|
package p
|
||||||
|
|
||||||
|
actual typealias Presence = P
|
||||||
|
sealed class P {
|
||||||
|
object Online : P()
|
||||||
|
object Offline : P()
|
||||||
|
}
|
||||||
Generated
+5
@@ -124,6 +124,11 @@ public class MultiPlatformHighlightingTestGenerated extends AbstractMultiPlatfor
|
|||||||
runTest("idea/testData/multiModuleHighlighting/multiplatform/platformTypeAliasInterchangebleWithAliasedClass/");
|
runTest("idea/testData/multiModuleHighlighting/multiplatform/platformTypeAliasInterchangebleWithAliasedClass/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("sealedTypeAlias")
|
||||||
|
public void testSealedTypeAlias() throws Exception {
|
||||||
|
runTest("idea/testData/multiModuleHighlighting/multiplatform/sealedTypeAlias/");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("suppressHeaderWithoutImpl")
|
@TestMetadata("suppressHeaderWithoutImpl")
|
||||||
public void testSuppressHeaderWithoutImpl() throws Exception {
|
public void testSuppressHeaderWithoutImpl() throws Exception {
|
||||||
runTest("idea/testData/multiModuleHighlighting/multiplatform/suppressHeaderWithoutImpl/");
|
runTest("idea/testData/multiModuleHighlighting/multiplatform/suppressHeaderWithoutImpl/");
|
||||||
|
|||||||
Reference in New Issue
Block a user