Mark incompatibilities related to the declaration signature as STRONG
This commit is contained in:
+9
@@ -5,6 +5,15 @@ Output:
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/classScopes/functionIncorrectSignature/jvm.kt:1:14: error: actual class 'Foo' has no corresponding members for expected class members:
|
||||
|
||||
public final expect fun function(b: ByteArray): Int
|
||||
|
||||
The following declaration is incompatible because return type is different:
|
||||
public final actual fun function(b: ByteArray): Long
|
||||
|
||||
actual class Foo {
|
||||
^
|
||||
compiler/testData/multiplatform/classScopes/functionIncorrectSignature/jvm.kt:2:40: error: actual function 'function' has no corresponding expected declaration
|
||||
The following declaration is incompatible because return type is different:
|
||||
public final expect fun function(b: ByteArray): Int
|
||||
|
||||
@@ -8,6 +8,12 @@ expect fun f21(c: suspend Unit.() -> Unit)
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:1:12: error: expected function 'f1' has no actual declaration in module
|
||||
The following declaration is incompatible because return type is different:
|
||||
public actual fun f1(): String
|
||||
|
||||
expect fun f1()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:5:14: error: expected function 'f3' has no actual declaration in module
|
||||
The following declaration is incompatible because parameter types are different:
|
||||
public actual fun f3(name: Double): Unit
|
||||
@@ -20,12 +26,30 @@ The following declaration is incompatible because parameter types are different:
|
||||
|
||||
expect fun String.f3ext()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:8:14: error: expected function 'f4' has no actual declaration in module
|
||||
The following declaration is incompatible because parameter shapes are different (extension vs non-extension):
|
||||
public actual fun String.f4(): Unit
|
||||
|
||||
expect fun f4(name: String)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:10:12: error: expected function 'f5' has no actual declaration in module
|
||||
The following declaration is incompatible because parameter shapes are different (extension vs non-extension):
|
||||
public actual fun f5(name: String): Unit
|
||||
|
||||
expect fun String.f5()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:12:14: error: expected function 'f6' has no actual declaration in module
|
||||
The following declaration is incompatible because number of value parameters is different:
|
||||
public actual fun f6(p2: Int): Unit
|
||||
|
||||
expect fun f6(p1: String, p2: Int)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:14:12: error: expected function 'f7' has no actual declaration in module
|
||||
The following declaration is incompatible because number of type parameters is different:
|
||||
public actual fun <K, V> f7(): Unit
|
||||
|
||||
expect fun <T> f7()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:32:15: error: expected function 'f21' has no actual declaration in module
|
||||
The following declaration is incompatible because parameter types are different:
|
||||
public actual fun f21(c: Unit.() -> Unit): Unit
|
||||
|
||||
@@ -5,6 +5,12 @@ Output:
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:14:16: error: expected class 'C1' has no actual declaration in module
|
||||
The following declaration is incompatible because number of type parameters is different:
|
||||
public final actual class C1<A, Extra>
|
||||
|
||||
expect class C1<A>
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/jvm.kt:1:8: error: actual interface 'PClass' has no corresponding expected declaration
|
||||
The following declaration is incompatible because class kinds are different (class, interface, object, enum, annotation):
|
||||
public final expect class PClass
|
||||
|
||||
Reference in New Issue
Block a user