Do not report "delegation member hides override" when hidden member is final

This situation is erroneous because OVERRIDING_FINAL_MEMBER_BY_DELEGATION is
already reported, no need to report another error
This commit is contained in:
Alexander Udalov
2016-12-19 12:48:13 +03:00
parent 482b43631c
commit ca886ecb8d
2 changed files with 9 additions and 9 deletions
@@ -63,7 +63,7 @@ class DelegationChecker : SimpleDeclarationChecker {
DescriptorUtils.getAllOverriddenDescriptors(delegatedDescriptor).filter { it.kind.isReal }.toSet()
) - DescriptorUtils.unwrapFakeOverride(delegatedToDescriptor).original
val nonAbstractReachable = reachableFromDelegated.filter { it.modality != Modality.ABSTRACT }
val nonAbstractReachable = reachableFromDelegated.filter { it.modality == Modality.OPEN }
if (nonAbstractReachable.isNotEmpty()) {
/*In case of MANY_IMPL_MEMBER_NOT_IMPLEMENTED error there could be several elements otherwise only one*/