Skip to content

Commit

Permalink
[FIR] Remove extra condition for reporting MANY_IMPL_MEMBER_NOT_IMPLE…
Browse files Browse the repository at this point in the history
…MENTED in delegation

In KT-56720, an extra condition was
added to prevent MANY_IMPL_MEMBER_NOT_IMPLEMENTED from being reported
when the same Java method was delegated to multiple times.
The fix was probably incorrect because the Java method in question
was default and shouldn't have been delegated to at all.
This was later fixed by KT-62334.

#KT-71215 Fixed
  • Loading branch information
cypressious authored and qodana-bot committed Sep 18, 2024
1 parent 5739326 commit d66ea44
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,7 @@ object FirNotImplementedOverrideChecker : FirClassChecker(MppCheckerKind.Platfor
val delegatedTo = delegatedWrapperData.wrapped.unwrapFakeOverrides().symbol

if (symbol.multipleDelegatesWithTheSameSignature == true) {
if (directOverriddenMembersWithBaseScope.isNotEmpty() &&
// We should report here if either 2+ members or single member with non-enhancement origin
directOverriddenMembersWithBaseScope.singleOrNull()?.member?.origin != FirDeclarationOrigin.Enhancement
) {
manyImplementationsDelegationSymbols.add(symbol)
}
manyImplementationsDelegationSymbols.add(symbol)
}

val firstFinal = filteredOverriddenMembers.firstOrNull { it.isFinal }
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// ISSUE: KT-71215

// FILE: Base.java
Expand Down

1 comment on commit d66ea44

@tocanqHQ
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry threrres alotm of thing in there to add

Please sign in to comment.