[FIR] FirScriptConfigurationExtensionImpl: change source element for result$$ property

We should use the source from replaced `FirAnonymousInitializer` as it
is more equivalent. Another point – the previous implementation
duplicated the source between generated FirProperty and initializer

^KT-65344
This commit is contained in:
Dmitrii Gridin
2024-02-02 21:10:35 +01:00
committed by Space Team
parent f972c8d239
commit 338c533a58
3 changed files with 8 additions and 18 deletions
@@ -1,10 +1,9 @@
KT element: KtCallExpression
FIR element: FirPropertyImpl
FIR element: FirFunctionCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
public final [ResolvedTo(BODY_RESOLVE)] val $$result: R|kotlin/Int| = R|/foo|()
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int|
R|/foo|()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] syntheticResultDeclaration.kts
@@ -1,18 +1,10 @@
KT element: KtScriptInitializer
FIR element: FirScriptImpl
FIR element: FirPropertyImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(BODY_RESOLVE)] <script-syntheticResultDeclarationInitializer.kts>
[ResolvedTo(BODY_RESOLVE)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun foo(): R|kotlin/Int| {
^foo Int(24)
}
public final [ResolvedTo(BODY_RESOLVE)] val $$result: R|kotlin/Int| = R|/foo|()
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int|
public final [ResolvedTo(BODY_RESOLVE)] val $$result: R|kotlin/Int| = R|/foo|()
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] syntheticResultDeclarationInitializer.kts