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,10 @@
package sample
expect class A {
fun commonFun()
val x: Int
val y: Double
val z: String
}
fun getCommonA(): A = null!!
@@ -0,0 +1,7 @@
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 }
jvm -> STDLIB_JVM { kind=DEPENDENCY }
main -> jvm, common { kind=DEPENDENCY }
@@ -0,0 +1,14 @@
@file:Suppress("UNUSED_PARAMETER")
package sample
actual data class A(actual val x: Int, actual val y: Double, val t: String) {
actual fun commonFun() {}
fun platformFun() {}
actual val z: String by lazy { "" }
operator fun iterator(): Iterator<Int> = null!!
}
fun testDelegate(): String = getCommonA().z
@@ -0,0 +1,20 @@
@file:Suppress("UNUSED_VARIABLE")
package sample
fun testDesctructing() {
val (x, y, t) = getCommonA()
val xx: Int = x
val yy: Double = y
val tt: String = t
}
fun testIterator(): Int {
var counter: Int = 0
for (x in getCommonA()) {
counter += x
}
return counter
}
fun testDelegate(): String = getCommonA().z