Minor. Merge multiplatformTypeRefinement testdata with multiplatform testdata

This commit is contained in:
Dmitry Savvinov
2019-07-30 12:25:49 +03:00
parent 9f90486893
commit 79313037d1
80 changed files with 93 additions and 110 deletions
@@ -0,0 +1,18 @@
@file:Suppress("NO_ACTUAL_FOR_EXPECT")
package foo
expect interface A {
fun commonFun()
val b: B
fun bFun(): B
}
expect interface B {
fun commonFunB()
}
class Common {
val a: A get() = null!!
fun aFun(): A = null!!
}
@@ -0,0 +1,6 @@
MODULE common { platform=[JVM, JS, Native]; root=common }
MODULE jvm { platform=[JVM]; root=jvm }
MODULE main { platform=[JVM]; root=main }
jvm -> common { kind=DEPENDS_ON }
main -> jvm { kind=DEPENDS_ON }
@@ -0,0 +1,15 @@
@file:Suppress("ACTUAL_WITHOUT_EXPECT")
package foo
actual interface A {
actual fun commonFun()
actual val b: B
actual fun bFun(): B
fun platformFun()
}
actual interface B {
actual fun commonFunB()
fun platformFunB()
}
@@ -0,0 +1,33 @@
package foo
fun test_a(a: A) {
a.commonFun()
a.platformFun()
a.b.commonFunB()
a.b.platformFunB()
a.bFun().commonFunB()
a.bFun().platformFunB()
}
fun test_c(c: Common) {
c.a.commonFun()
c.a.platformFun()
c.aFun().commonFun()
c.aFun().platformFun()
c.a.b.commonFunB()
c.a.b.platformFunB()
c.aFun().b.commonFunB()
c.aFun().b.platformFunB()
c.a.bFun().commonFunB()
c.a.bFun().platformFunB()
c.aFun().bFun().commonFunB()
c.aFun().bFun().platformFunB()
}