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
92 lines
4.6 KiB
Plaintext
Vendored
92 lines
4.6 KiB
Plaintext
Vendored
-- Common --
|
|
Exit code: OK
|
|
Output:
|
|
|
|
-- JVM --
|
|
Exit code: COMPILATION_ERROR
|
|
Output:
|
|
compiler/testData/multiplatform/incompatibleClasses/jvm.kt:1:16: error: 'impl' interface 'PClass' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because class kinds are different (class, interface, object, enum, annotation):
|
|
public final header class PClass
|
|
|
|
impl interface PClass
|
|
^
|
|
compiler/testData/multiplatform/incompatibleClasses/jvm.kt:2:6: error: 'impl' object 'PInterface' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because class kinds are different (class, interface, object, enum, annotation):
|
|
public header interface PInterface
|
|
|
|
impl object PInterface
|
|
^
|
|
compiler/testData/multiplatform/incompatibleClasses/jvm.kt:3:17: error: 'impl' enum class 'PObject' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because class kinds are different (class, interface, object, enum, annotation):
|
|
public header object PObject
|
|
|
|
impl enum class PObject
|
|
^
|
|
compiler/testData/multiplatform/incompatibleClasses/jvm.kt:4:23: error: 'impl' annotation class 'PEnumClass' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because class kinds are different (class, interface, object, enum, annotation):
|
|
public final header enum class PEnumClass : Enum<PEnumClass>
|
|
|
|
impl annotation class PEnumClass
|
|
^
|
|
compiler/testData/multiplatform/incompatibleClasses/jvm.kt:5:12: error: 'impl' class 'PAnnotationClass' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because class kinds are different (class, interface, object, enum, annotation):
|
|
public final header annotation class PAnnotationClass : Annotation
|
|
|
|
impl class PAnnotationClass
|
|
^
|
|
compiler/testData/multiplatform/incompatibleClasses/jvm.kt:7:14: error: 'impl' object 'InternalObject' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because visibility is different:
|
|
internal header object InternalObject
|
|
|
|
private impl object InternalObject
|
|
^
|
|
compiler/testData/multiplatform/incompatibleClasses/jvm.kt:8:15: error: 'impl' object 'PublicObject' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because visibility is different:
|
|
public header object PublicObject
|
|
|
|
internal impl object PublicObject
|
|
^
|
|
compiler/testData/multiplatform/incompatibleClasses/jvm.kt:9:13: error: 'impl' object 'PrivateObject' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because visibility is different:
|
|
private header object PrivateObject
|
|
|
|
public impl object PrivateObject
|
|
^
|
|
compiler/testData/multiplatform/incompatibleClasses/jvm.kt:11:18: error: 'impl' class 'OpenClass' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because modality is different:
|
|
public open header class OpenClass
|
|
|
|
final impl class OpenClass
|
|
^
|
|
compiler/testData/multiplatform/incompatibleClasses/jvm.kt:12:17: error: 'impl' class 'AbstractClass' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because modality is different:
|
|
public abstract header class AbstractClass
|
|
|
|
open impl class AbstractClass
|
|
^
|
|
compiler/testData/multiplatform/incompatibleClasses/jvm.kt:13:21: error: 'impl' class 'FinalClass' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because modality is different:
|
|
public final header class FinalClass
|
|
|
|
abstract impl class FinalClass
|
|
^
|
|
compiler/testData/multiplatform/incompatibleClasses/jvm.kt:15:12: error: 'impl' class 'C1' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because number of type parameters is different:
|
|
public final header class C1<A>
|
|
|
|
impl class C1<A, Extra>
|
|
^
|
|
compiler/testData/multiplatform/incompatibleClasses/jvm.kt:16:12: error: 'impl' class 'C2' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because declaration-site variances of type parameters are different:
|
|
public final header class C2<B>
|
|
|
|
impl class C2<out B>
|
|
^
|
|
compiler/testData/multiplatform/incompatibleClasses/jvm.kt:22:21: error: 'impl' class 'ExtendsNumber' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because some supertypes are missing in the implementation:
|
|
public abstract header class ExtendsNumber : Number
|
|
|
|
impl abstract class ExtendsNumber : Any()
|
|
^
|