Minor. Merge multiplatformTypeRefinement testdata with multiplatform testdata
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
@file:Suppress("UNUSED_PARAMETER")
|
||||
|
||||
package sample
|
||||
|
||||
expect interface A {
|
||||
fun common_1_A()
|
||||
}
|
||||
|
||||
expect interface B : A {
|
||||
fun common_1_B()
|
||||
}
|
||||
|
||||
fun getB(): B = null!!
|
||||
|
||||
class Out<out T>(val value: T)
|
||||
|
||||
fun takeOutA_common_1(t: Out<A>) {}
|
||||
fun takeOutB_common_1(t: Out<B>) {}
|
||||
@@ -0,0 +1,38 @@
|
||||
@file:Suppress("UNUSED_PARAMETER")
|
||||
|
||||
package sample
|
||||
|
||||
expect interface A_Common {
|
||||
fun common_1_A()
|
||||
fun common_2_A()
|
||||
}
|
||||
|
||||
actual typealias A = A_Common
|
||||
|
||||
actual interface B : A {
|
||||
actual fun common_1_B()
|
||||
fun common_1_2_B()
|
||||
}
|
||||
|
||||
fun takeOutA_common_2(t: Out<A>) {}
|
||||
fun takeOutB_common_2(t: Out<B>) {}
|
||||
fun takeOutA_Common_common_2(t: Out<A_Common>) {}
|
||||
|
||||
fun getOutA(): Out<A> = null!!
|
||||
fun getOutB(): Out<B> = null!!
|
||||
fun getOutA_Common(): Out<A_Common> = null!!
|
||||
|
||||
fun test_case_2(x: B) {
|
||||
x.common_1_A()
|
||||
x.common_1_B()
|
||||
x.common_2_A()
|
||||
x.common_1_2_B()
|
||||
}
|
||||
|
||||
fun test_B() {
|
||||
val x = getB()
|
||||
x.common_1_A()
|
||||
x.common_1_B()
|
||||
x.common_2_A()
|
||||
x.common_1_2_B()
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
MODULE common-1 { platform=[JVM, JS, Native]; root=common-1 }
|
||||
MODULE common-2 { platform=[JVM, JS, Native]; root=common-2 }
|
||||
|
||||
MODULE jvm { platform=[JVM]; root=jvm }
|
||||
|
||||
common-2 -> common-1 { kind=DEPENDS_ON }
|
||||
|
||||
jvm -> common-2 { kind=DEPENDS_ON }
|
||||
@@ -0,0 +1,17 @@
|
||||
This file presents modules dependency graph for the test (classes).
|
||||
Please, use monospaced font.
|
||||
|
||||
|
||||
common-1
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
common-2
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
jvm
|
||||
@@ -0,0 +1,53 @@
|
||||
package sample
|
||||
|
||||
actual interface A_Common {
|
||||
actual fun common_1_A()
|
||||
actual fun common_2_A()
|
||||
fun jvm_A()
|
||||
}
|
||||
|
||||
interface Case_2_3 : B {
|
||||
fun jvm_Case_2_3()
|
||||
}
|
||||
|
||||
fun test_A(x: B) {
|
||||
x.common_1_A()
|
||||
x.common_1_B()
|
||||
x.common_2_A()
|
||||
x.common_1_2_B()
|
||||
x.jvm_A()
|
||||
}
|
||||
|
||||
fun test_A(x: Case_2_3) {
|
||||
x.common_1_A()
|
||||
x.common_1_B()
|
||||
x.common_2_A()
|
||||
x.common_1_2_B()
|
||||
x.jvm_A()
|
||||
x.jvm_Case_2_3()
|
||||
}
|
||||
|
||||
fun test_B() {
|
||||
val x = getB()
|
||||
x.common_1_A()
|
||||
x.common_1_B()
|
||||
x.common_2_A()
|
||||
x.common_1_2_B()
|
||||
x.jvm_A()
|
||||
}
|
||||
|
||||
fun test_case_2_3() {
|
||||
takeOutA_common_1(getOutB())
|
||||
takeOutB_common_1(getOutB())
|
||||
takeOutA_common_2(getOutB())
|
||||
takeOutB_common_2(getOutB())
|
||||
takeOutA_Common_common_2(getOutB())
|
||||
|
||||
takeOutA_common_1(getOutA())
|
||||
takeOutA_common_2(getOutA())
|
||||
takeOutA_Common_common_2(getOutA())
|
||||
|
||||
takeOutA_common_1(getOutA_Common())
|
||||
takeOutA_common_2(getOutA_Common())
|
||||
takeOutA_Common_common_2(getOutA_Common())
|
||||
}
|
||||
Reference in New Issue
Block a user