Add test on overriding declaration with a composite type with expect declaration

This commit is contained in:
Dmitry Savvinov
2020-10-05 18:00:22 +03:00
parent f8b9011667
commit 01d6181050
4 changed files with 39 additions and 0 deletions
@@ -0,0 +1,15 @@
expect class Expect
class Box<out T>(val x: T)
interface Base {
fun expectInReturnType(): Box<Expect>
fun expectInArgument(e: Box<Expect>)
fun Box<Expect>.expectInReceiver()
val expectVal: Box<Expect>
var expectVar: Box<Expect>
}
@@ -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,13 @@
actual typealias Expect = String
interface Derived : Base {
override fun expectInReturnType(): Box<Expect>
override fun expectInArgument(e: Box<Expect>)
override fun Box<Expect>.expectInReceiver()
override val expectVal: Box<Expect>
override var expectVar: Box<Expect>
}
@@ -183,6 +183,11 @@ public class MultiplatformAnalysisTestGenerated extends AbstractMultiplatformAna
runTest("idea/testData/multiplatform/overrideExpect/");
}
@TestMetadata("overrideExpectWithCompositeType")
public void testOverrideExpectWithCompositeType() throws Exception {
runTest("idea/testData/multiplatform/overrideExpectWithCompositeType/");
}
@TestMetadata("platformSpecificChecksInCommon")
public void testPlatformSpecificChecksInCommon() throws Exception {
runTest("idea/testData/multiplatform/platformSpecificChecksInCommon/");