[IR] Prevent duplicated reports of ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT

...on property accessors and enum entries.

^KT-62559
This commit is contained in:
Roman Efremov
2023-10-20 19:44:08 +02:00
committed by Space Team
parent 2b120f6cdc
commit 29c82c668f
7 changed files with 42 additions and 16 deletions
@@ -559,6 +559,19 @@ internal abstract class IrExpectActualMatchingContext(
// IR checker traverses member scope itself and collects mappings
override val checkClassScopesForAnnotationCompatibility = false
/**
* From IR checker point of view geter and seter are usual methods, so they don't need
* special handling inside checker.
* This is to prevent duplicated reports of diagnostic.
*/
override val checkPropertyAccessorsForAnnotationsCompatibility = false
/**
* Same as [checkPropertyAccessorsForAnnotationsCompatibility], enum entries are usual
* callables for IR checker, so they don't need special handling.
*/
override val checkEnumEntriesForAnnotationsCompatibility = false
override fun skipCheckingAnnotationsOfActualClassMember(actualMember: DeclarationSymbolMarker): Boolean = error("Should not be called")
override fun findPotentialExpectClassMembersForActual(