[FE, IR] Add expect actual annotations incompatibility info into diagnostic
This is needed for more beautiful reporting and easier implementation of quick fix in IDE. ^KT-58551
This commit is contained in:
committed by
Space Team
parent
a64bac0b8c
commit
11ccad7e40
+7
@@ -16,4 +16,11 @@ sealed class ExpectActualAnnotationsIncompatibilityType<out A> {
|
||||
override val expectAnnotation: A,
|
||||
val actualAnnotation: A
|
||||
) : ExpectActualAnnotationsIncompatibilityType<A>()
|
||||
|
||||
fun <A2> mapAnnotationType(mapper: (A) -> A2): ExpectActualAnnotationsIncompatibilityType<A2> {
|
||||
return when (this) {
|
||||
is MissingOnActual -> MissingOnActual(mapper(expectAnnotation))
|
||||
is DifferentOnActual<A> -> DifferentOnActual(mapper(expectAnnotation), mapper(actualAnnotation))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user