[FIR] Cleanup ACTUAL_MISSING reporting
The cleanup became possible after KT-62590 Review: https://jetbrains.team/p/kt/reviews/12750/timeline `matchingCompatibilityToMembersMap.allMismatches()` is equivalent to `ExpectActualMatchingCompatibility.MatchedSuccessfully !in matchingCompatibilityToMembersMap`
This commit is contained in:
+3
-11
@@ -145,14 +145,10 @@ object FirExpectActualDeclarationChecker : FirBasicDeclarationChecker() {
|
||||
|
||||
val source = declaration.source
|
||||
if (!declaration.isActual) {
|
||||
if (matchingCompatibilityToMembersMap.allMismatches()) return
|
||||
|
||||
if (ExpectActualMatchingCompatibility.MatchedSuccessfully in matchingCompatibilityToMembersMap) {
|
||||
if (checkActual) {
|
||||
reporter.reportOn(source, FirErrors.ACTUAL_MISSING, context)
|
||||
}
|
||||
return
|
||||
if (checkActual && ExpectActualMatchingCompatibility.MatchedSuccessfully in matchingCompatibilityToMembersMap) {
|
||||
reporter.reportOn(source, FirErrors.ACTUAL_MISSING, context)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
when {
|
||||
@@ -297,10 +293,6 @@ object FirExpectActualDeclarationChecker : FirBasicDeclarationChecker() {
|
||||
)
|
||||
}
|
||||
|
||||
fun Map<out ExpectActualCompatibility<*>, *>.allMismatches(): Boolean {
|
||||
return keys.all { it is ExpectActualMatchingCompatibility.Mismatch }
|
||||
}
|
||||
|
||||
// we don't require `actual` modifier on
|
||||
// - annotation constructors, because annotation classes can only have one constructor
|
||||
// - value class primary constructors, because value class must have primary constructor
|
||||
|
||||
Reference in New Issue
Block a user