[Tests] Re-enable K1 IC tests for expect-actual

^KT-60831 fixed
^KT-60831 next step KT-63183


Merge-request: KT-MR-12855
Merged-by: Evgenii Mazhukin <evgenii.mazhukin@jetbrains.com>
This commit is contained in:
Evgenii Mazhukin
2023-11-06 19:46:43 +00:00
committed by Space Team
parent 4050285fef
commit 20af98c776
27 changed files with 58 additions and 32 deletions
@@ -0,0 +1,4 @@
actual class X {
actual fun foo(): Any = 0
fun bar(): Any = 1
}
@@ -0,0 +1 @@
-language-version 1.9
@@ -0,0 +1,9 @@
================ Step #1 =================
Compiling files:
src/X.kt
src/commonX.kt
src/utilsActual.kt
src/utilsNoActual.kt
End of files
Exit code: OK
@@ -0,0 +1,5 @@
expect class X {
fun foo(): Any
}
expect fun useX(x: X): Any
@@ -0,0 +1 @@
fun dummy() {}
@@ -0,0 +1,4 @@
@file:JvmMultifileClass
@file:JvmName("Utils")
actual fun useX(x: X): Any = x.foo()
@@ -0,0 +1,6 @@
@file:JvmMultifileClass
@file:JvmName("Utils")
actual fun useX(x: X): Any = x.foo()
fun newFun() = 1
@@ -0,0 +1,4 @@
@file:JvmMultifileClass
@file:JvmName("Utils")
fun useXBar(x: X) = x.bar()
@@ -0,0 +1,6 @@
package org.example
@OptIn(kotlin.ExperimentalMultiplatform::class)
@Target(AnnotationTarget.FILE)
@Retention(AnnotationRetention.SOURCE)
internal actual annotation class A
@@ -0,0 +1,3 @@
-Xmulti-platform
-Xexpect-actual-classes
-language-version 1.9
@@ -0,0 +1,7 @@
@file:A
package org.example
fun foo() {
// 1
}
@@ -0,0 +1,7 @@
@file:A
package org.example
fun foo() {
// 2
}
@@ -0,0 +1,7 @@
@file:A
package org.example
fun foo() {
// 3
}
@@ -0,0 +1,14 @@
================ Step #1 =================
Compiling files:
src/b.kt
End of files
Exit code: OK
================ Step #2 =================
Compiling files:
src/b.kt
End of files
Exit code: OK
@@ -0,0 +1,7 @@
package org.example
@OptIn(kotlin.ExperimentalMultiplatform::class)
@OptionalExpectation
@Target(AnnotationTarget.FILE)
@Retention(AnnotationRetention.SOURCE)
internal expect annotation class A