Add test on override with expect in return type
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
expect class Expect
|
||||||
|
|
||||||
|
interface Base {
|
||||||
|
fun expectInReturnType(): Expect
|
||||||
|
|
||||||
|
fun expectInArgument(e: Expect)
|
||||||
|
|
||||||
|
fun Expect.expectInReceiver()
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
MODULE jvm { platform=[JVM] }
|
||||||
|
MODULE common { platform=[JVM] }
|
||||||
|
|
||||||
|
jvm -> STDLIB_JVM { kind=DEPENDENCY }
|
||||||
|
common -> STDLIB_COMMON { kind=DEPENDENCY }
|
||||||
|
jvm -> common { kind=DEPENDS_ON }
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
actual typealias Expect = String
|
||||||
|
|
||||||
|
interface Derived : Base {
|
||||||
|
override fun expectInReturnType(): <!RETURN_TYPE_MISMATCH_ON_OVERRIDE!>Expect<!>
|
||||||
|
|
||||||
|
override fun expectInArgument(e: Expect)
|
||||||
|
|
||||||
|
override fun Expect.expectInReceiver()
|
||||||
|
}
|
||||||
Generated
+5
@@ -178,6 +178,11 @@ public class MultiplatformAnalysisTestGenerated extends AbstractMultiplatformAna
|
|||||||
runTest("idea/testData/multiplatform/multilevelParents/");
|
runTest("idea/testData/multiplatform/multilevelParents/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("overrideExpect")
|
||||||
|
public void testOverrideExpect() throws Exception {
|
||||||
|
runTest("idea/testData/multiplatform/overrideExpect/");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("platformSpecificChecksInCommon")
|
@TestMetadata("platformSpecificChecksInCommon")
|
||||||
public void testPlatformSpecificChecksInCommon() throws Exception {
|
public void testPlatformSpecificChecksInCommon() throws Exception {
|
||||||
runTest("idea/testData/multiplatform/platformSpecificChecksInCommon/");
|
runTest("idea/testData/multiplatform/platformSpecificChecksInCommon/");
|
||||||
|
|||||||
Reference in New Issue
Block a user