Add test on override with expect in return type

This commit is contained in:
Dmitry Savvinov
2020-09-18 18:58:17 +03:00
parent f8b8f94040
commit 80f4061a3d
4 changed files with 29 additions and 0 deletions
@@ -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 }
+9
View File
@@ -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()
}
@@ -178,6 +178,11 @@ public class MultiplatformAnalysisTestGenerated extends AbstractMultiplatformAna
runTest("idea/testData/multiplatform/multilevelParents/");
}
@TestMetadata("overrideExpect")
public void testOverrideExpect() throws Exception {
runTest("idea/testData/multiplatform/overrideExpect/");
}
@TestMetadata("platformSpecificChecksInCommon")
public void testPlatformSpecificChecksInCommon() throws Exception {
runTest("idea/testData/multiplatform/platformSpecificChecksInCommon/");