FIR: make class delegation field a fake source

Previously, the FirFieldImpl generated from class delegation has a real
source. This causes troubles in the IDE. This change adds a new fake
source kind for class delegation fields.
This commit is contained in:
Tianyu Geng
2021-04-22 14:56:43 -07:00
committed by TeamCityServer
parent 0b8b20eda0
commit d09be811f0
3 changed files with 7 additions and 2 deletions
@@ -170,6 +170,10 @@ sealed class FirFakeSourceElementKind : FirSourceElementKind() {
// for java annotations constructor implicit parameters are generated
// with a fake source which refers to declared annotation methods
object ImplicitAnnotationAnnotationConstructorParameter : FirFakeSourceElementKind()
// for the implicit field storing the delegated object for class delegation
// with a fake source that refers to the KtExpression that creates the delegate
object ClassDelegationField : FirFakeSourceElementKind()
}
sealed class FirSourceElement {