mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 08:31:29 +00:00
Try to report most of the errors on the actual members of the impl class. In many cases, there's a 1:1 mapping of header to impl class members, so the error "some members are not implemented" on the class declaration itself is redundant. Exceptions include functions/properties from supertypes (there may be no other place to report a signature mismatch error in this case), functions/properties not marked with 'impl' (the checker is only run for declarations explicitly marked with 'impl') and default constructors (the checker is not run for them) #KT-18447 Fixed
23 lines
698 B
Plaintext
Vendored
23 lines
698 B
Plaintext
Vendored
-- Common --
|
|
Exit code: OK
|
|
Output:
|
|
|
|
-- JVM --
|
|
Exit code: COMPILATION_ERROR
|
|
Output:
|
|
compiler/testData/multiplatform/missingOverload/common.kt:7:1: error: 'header' function 'g' has no implementation in module
|
|
The following declaration is incompatible because parameter types are different:
|
|
public impl fun g(a: Any): Unit
|
|
|
|
header fun g(s: String)
|
|
^
|
|
compiler/testData/multiplatform/missingOverload/jvm.kt:1:12: error: 'impl' class 'Foo' has no implementation of 'header' class members:
|
|
|
|
public final header fun f(a: Any): Unit
|
|
|
|
The following declaration is incompatible because parameter types are different:
|
|
public final impl fun f(s: String): Unit
|
|
|
|
impl class Foo {
|
|
^
|