@@ -0,0 +1,4 @@
|
||||
actual class X {
|
||||
actual fun foo(): Any = 0
|
||||
fun bar(): Any = 1
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Compiling files:
|
||||
src/X.kt
|
||||
src/commonX.kt
|
||||
src/utilsActual.kt
|
||||
src/utilsNoActual.kt
|
||||
End of files
|
||||
Exit code: ABORT
|
||||
------------------------------------------
|
||||
COMPILATION FAILED
|
||||
Class 'X' has several compatible actual declarations in modules <multifilePartChanged>, <multifilePartChanged>
|
||||
Function 'foo' has several compatible actual declarations in modules <multifilePartChanged>, <multifilePartChanged>
|
||||
Function 'useX' has several compatible actual declarations in modules <multifilePartChanged>, <multifilePartChanged>
|
||||
@@ -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()
|
||||
+6
@@ -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()
|
||||
Reference in New Issue
Block a user