Compile actual and expected declarations together
#KT-20840 fixed
Original commit: fec2d08d22
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
actual class X {
|
||||||
|
actual fun foo(): Any = 0
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
actual class Y {
|
||||||
|
actual fun foo(): Any = 0
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
actual class Z {
|
||||||
|
actual fun foo(): Any = 0
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Compiling files:
|
||||||
|
src/X.kt
|
||||||
|
src/commonX.kt
|
||||||
|
src/useX.kt
|
||||||
|
End of files
|
||||||
|
Exit code: SUCCESS
|
||||||
|
|
||||||
|
================ Step #2 =================
|
||||||
|
|
||||||
|
Compiling files:
|
||||||
|
src/Y.kt
|
||||||
|
src/Z.kt
|
||||||
|
src/commonY.kt
|
||||||
|
src/commonZ.kt
|
||||||
|
src/useYZ.kt
|
||||||
|
End of files
|
||||||
|
Exit code: SUCCESS
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
expect class X {
|
||||||
|
fun foo(): Any
|
||||||
|
}
|
||||||
|
|
||||||
|
expect fun useX(x: X): Unit
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
expect class Y {
|
||||||
|
fun foo(): Any
|
||||||
|
}
|
||||||
|
|
||||||
|
expect fun useY(y: Y): Unit
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
expect class Z {
|
||||||
|
fun foo(): Any
|
||||||
|
}
|
||||||
|
|
||||||
|
expect fun useZ(z: Z): Unit
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
fun dummy() {}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
actual fun useX(x: X): Unit {
|
||||||
|
x.foo()
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
actual fun useY(y: Y): Unit {
|
||||||
|
y.foo()
|
||||||
|
}
|
||||||
|
|
||||||
|
actual fun useZ(z: Z): Unit {
|
||||||
|
z.foo()
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
actual class X {
|
||||||
|
actual fun foo(): Any = 0
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
actual class Y {
|
||||||
|
actual fun foo(): Any = 0
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
actual class Z {
|
||||||
|
actual fun foo(): Any = 0
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Compiling files:
|
||||||
|
src/X.kt
|
||||||
|
src/commonX.kt
|
||||||
|
src/useX.kt
|
||||||
|
End of files
|
||||||
|
Exit code: SUCCESS
|
||||||
|
|
||||||
|
================ Step #2 =================
|
||||||
|
|
||||||
|
Compiling files:
|
||||||
|
src/Y.kt
|
||||||
|
src/Z.kt
|
||||||
|
src/commonY.kt
|
||||||
|
src/commonZ.kt
|
||||||
|
src/useYZ.kt
|
||||||
|
End of files
|
||||||
|
Exit code: SUCCESS
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
expect class X {
|
||||||
|
fun foo(): Any
|
||||||
|
}
|
||||||
|
|
||||||
|
expect fun useX(x: X): Unit
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
expect class Y {
|
||||||
|
fun foo(): Any
|
||||||
|
}
|
||||||
|
|
||||||
|
expect fun useY(y: Y): Unit
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
expect class Z {
|
||||||
|
fun foo(): Any
|
||||||
|
}
|
||||||
|
|
||||||
|
expect fun useZ(z: Z): Unit
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
fun dummy() {}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
actual fun useX(x: X): Unit {
|
||||||
|
x.foo()
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fun useX(x: String): Int =
|
||||||
|
x.length
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
actual fun useY(y: Y): Unit {
|
||||||
|
y.foo()
|
||||||
|
}
|
||||||
|
|
||||||
|
actual fun useZ(z: Z): Unit {
|
||||||
|
z.foo()
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user