74ba0080b1
Try to report most mismatch errors on the 'impl' declaration. Only report a mismatch error on the 'header' declaration if no error would be otherwise reported on any 'impl' declaration in the compilation unit. Also render declaration kind in the message #KT-18447 In Progress
38 lines
2.0 KiB
Plaintext
Vendored
38 lines
2.0 KiB
Plaintext
Vendored
-- Common --
|
|
Exit code: OK
|
|
Output:
|
|
|
|
-- JVM --
|
|
Exit code: COMPILATION_ERROR
|
|
Output:
|
|
compiler/testData/multiplatform/incompatibleFunctions/jvm.kt:1:1: error: 'impl' function 'plus' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because some modifiers on header declaration are missing on the implementation (external, infix, inline, operator, tailrec):
|
|
public infix header fun Int.plus(s: CharSequence): Int
|
|
|
|
impl fun Int.plus(s: CharSequence): Int = 0
|
|
^
|
|
compiler/testData/multiplatform/incompatibleFunctions/jvm.kt:3:1: error: 'impl' function 'times' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because some modifiers on header declaration are missing on the implementation (external, infix, inline, operator, tailrec):
|
|
public operator header fun Double.times(x: CharArray): Unit
|
|
|
|
impl fun Double.times(x: CharArray) {}
|
|
^
|
|
compiler/testData/multiplatform/incompatibleFunctions/jvm.kt:5:1: error: 'impl' function 'f1' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because some modifiers on header declaration are missing on the implementation (external, infix, inline, operator, tailrec):
|
|
public external header fun f1(): Unit
|
|
|
|
impl fun f1() {}
|
|
^
|
|
compiler/testData/multiplatform/incompatibleFunctions/jvm.kt:7:1: error: 'impl' function 'f2' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because some modifiers on header declaration are missing on the implementation (external, infix, inline, operator, tailrec):
|
|
public header inline fun f2(): Unit
|
|
|
|
impl fun f2() {}
|
|
^
|
|
compiler/testData/multiplatform/incompatibleFunctions/jvm.kt:9:1: error: 'impl' function 'f3' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because some modifiers on header declaration are missing on the implementation (external, infix, inline, operator, tailrec):
|
|
public header tailrec fun f3(): Unit
|
|
|
|
impl fun f3() {}
|
|
^
|