Add a test for KT-38338
^KT-38338
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
package com.example
|
||||
|
||||
interface CommonMainIface {
|
||||
fun f() = Unit
|
||||
}
|
||||
|
||||
internal expect abstract class CommonMainExpectDerivedClass constructor() : CommonMainIface
|
||||
|
||||
internal abstract class CommonMainImplClass : CommonMainExpectDerivedClass()
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.example
|
||||
|
||||
internal actual abstract class CommonMainExpectDerivedClass actual constructor() : CommonMainIface
|
||||
|
||||
internal class IosMainImplClass : CommonMainImplClass()
|
||||
|
||||
internal fun getInstance() = IosMainImplClass()
|
||||
|
||||
fun main() {
|
||||
getInstance().f()
|
||||
(getInstance() as CommonMainImplClass).f()
|
||||
(getInstance() as CommonMainExpectDerivedClass).f()
|
||||
(getInstance() as CommonMainIface).f()
|
||||
}
|
||||
Generated
+5
@@ -24,6 +24,11 @@ public class MultiPlatformHighlightingTestGenerated extends AbstractMultiPlatfor
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("actualizedSupertype")
|
||||
public void testActualizedSupertype() throws Exception {
|
||||
runTest("idea/testData/multiModuleHighlighting/multiplatform/actualizedSupertype/");
|
||||
}
|
||||
|
||||
@TestMetadata("additionalMembersInPlatformInterface")
|
||||
public void testAdditionalMembersInPlatformInterface() throws Exception {
|
||||
runTest("idea/testData/multiModuleHighlighting/multiplatform/additionalMembersInPlatformInterface/");
|
||||
|
||||
Reference in New Issue
Block a user