[FE] Skip delegation descriptors during default params matching

^KT-61163 Fixed
Review: https://jetbrains.team/p/kt/reviews/11599/timeline

They can be safely skiped because we check overridden descriptors
anyway.

IMO, it's a bug that delegated descriptors are copied with default
params. But it's much harder problem, and my IMO can easily be wrong for
some weird reason.
This commit is contained in:
Nikita Bobko
2023-08-11 12:21:58 +02:00
committed by Space Team
parent 8a576438ce
commit 577d0db3f1
8 changed files with 102 additions and 2 deletions
@@ -207,7 +207,7 @@ class ClassicExpectActualMatchingContext(
// Tests work even if you don't filter out fake-overrides. Filtering fake-overrides is needed because
// the returned descriptors are compared by `equals`. And `equals` for fake-overrides is weird.
// I didn't manage to invent a test that would check this condition
.filter { it.kind.isReal }
.filter { it.kind != CallableMemberDescriptor.Kind.FAKE_OVERRIDE && it.kind != CallableMemberDescriptor.Kind.DELEGATION }
override fun CallableSymbolMarker.isAnnotationConstructor(): Boolean {
val descriptor = safeAsDescriptor<ConstructorDescriptor>() ?: return false