[LL FIR] fix designation path for synthetic declarations

A designation path for synthetic declarations like fake override
or member delegate contained the wrong FirFile, because it
was provided by the original declaration that is wrong.
So we should pick up the file from our path, because it shouldn't be
synthetic

^KT-59505 Fixed
This commit is contained in:
Dmitrii Gridin
2023-06-20 17:04:40 +02:00
committed by Space Team
parent a3758bf70b
commit f74d4494aa
19 changed files with 1445 additions and 17 deletions
@@ -21,6 +21,7 @@ abstract class ConeSubstitutor : TypeSubstitutorMarker {
return null
}
override fun toString(): String = "Empty"
}
}
@@ -207,7 +207,11 @@ class DelegatedWrapperData<D : FirCallableDeclaration>(
val wrapped: D,
val containingClass: ConeClassLikeLookupTag,
val delegateField: FirField,
)
) {
override fun toString(): String = "[${::wrapped.name}=${wrapped.symbol}, " +
"${::containingClass.name}=$containingClass, " +
"${::delegateField.name}=${delegateField.symbol}"
}
var <D : FirCallableDeclaration>
D.delegatedWrapperData: DelegatedWrapperData<D>? by FirDeclarationDataRegistry.data(DelegatedWrapperDataKey)