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
56 lines
2.6 KiB
Plaintext
Vendored
56 lines
2.6 KiB
Plaintext
Vendored
-- Common --
|
|
Exit code: OK
|
|
Output:
|
|
|
|
-- JVM --
|
|
Exit code: COMPILATION_ERROR
|
|
Output:
|
|
compiler/testData/multiplatform/incompatibleNestedClasses/jvm.kt:2:20: error: 'impl' interface 'N1' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because class kinds are different (class, interface, object, enum, annotation):
|
|
public final header class N1
|
|
|
|
impl interface N1
|
|
^
|
|
compiler/testData/multiplatform/incompatibleNestedClasses/jvm.kt:3:10: error: 'impl' object 'N2' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because class kinds are different (class, interface, object, enum, annotation):
|
|
public header interface N2
|
|
|
|
impl object N2
|
|
^
|
|
compiler/testData/multiplatform/incompatibleNestedClasses/jvm.kt:4:16: error: 'impl' class 'N3' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because class kinds are different (class, interface, object, enum, annotation):
|
|
public header object N3
|
|
|
|
impl class N3
|
|
^
|
|
compiler/testData/multiplatform/incompatibleNestedClasses/jvm.kt:8:22: error: 'impl' class 'N2' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because modifiers are different (companion, inner):
|
|
public final header class N2
|
|
|
|
impl inner class N2
|
|
^
|
|
compiler/testData/multiplatform/incompatibleNestedClasses/jvm.kt:9:16: error: 'impl' class 'I2' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because modifiers are different (companion, inner):
|
|
public final header inner class I2
|
|
|
|
impl class I2
|
|
^
|
|
compiler/testData/multiplatform/incompatibleNestedClasses/jvm.kt:13:20: error: 'impl' companion object 'Companion' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because modifiers are different (companion, inner):
|
|
public header object Companion
|
|
|
|
impl companion object {}
|
|
^
|
|
compiler/testData/multiplatform/incompatibleNestedClasses/jvm.kt:14:10: error: 'impl' object 'Factory' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because modifiers are different (companion, inner):
|
|
public header companion object Factory
|
|
|
|
impl object Factory
|
|
^
|
|
compiler/testData/multiplatform/incompatibleNestedClasses/jvm.kt:18:10: error: 'impl' object 'Companion' has no corresponding 'header' declaration
|
|
The following declaration is incompatible because modifiers are different (companion, inner):
|
|
public header companion object
|
|
|
|
impl object Companion
|
|
^
|