Files
kotlin-fork/analysis/low-level-api-fir/testData/contextCollector/scripts/scriptInsideLastStatement.copy.txt
T
Ilya Chernikov 9037975758 K2 Scripting: Skip base class params from resolution scope
The base class in scripting considered obsolete and therefore supported
via some ad-hoc mechanisms. In particular parameters to the base class
c-tor are passed via script provided properties. But in combination
with the resolution logic, this leads to issues described in KT-60452
This commits filters out such parameters from script resolution
scope and avoids this problem for now.
Bot it should be noted that proper diagnostics for properties shadowing
should still be implemented - see #KT-65809
#KT-60452 fixed
2024-02-23 22:03:44 +00:00

76 lines
3.5 KiB
Plaintext
Vendored

Tower Data Context:
Element 0
Scope: FirDefaultStarImportingScope
Element 1
Scope: FirExplicitStarImportingScope
Element 2
Scope: FirDefaultSimpleImportingScope
Element 3
Scope: FirDefaultSimpleImportingScope
Element 4
Scope: FirPackageMemberScope
Element 5
Scope: FirExplicitSimpleImportingScope
Element 6
Scope: FirScriptDeclarationsScope
Classifiers:
FirRegularClassSymbol public final? class ScriptClass : R|kotlin/Any|
Functions
FirNamedFunctionSymbol public final fun foo(i: R|kotlin/Int|, action: R|(kotlin/Int) -> kotlin/Unit|): R|kotlin/Unit|
FirNamedFunctionSymbol public final fun scriptFunction(): R|kotlin/Int|
FirNamedFunctionSymbol public? final? fun unusedScriptFunction(p: String): <implicit>
Properties:
FirPropertySymbol public final val $$result: R|kotlin/Unit|
public get(): R|kotlin/Unit|
Element 7
Scope: FirLocalScope
Element 8
Context receivers:
FirScriptSymbol context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: <script-scriptInsideLastStatement.kts>
lval args: R|kotlin/Array<kotlin/String>|
public final? class ScriptClass : R|kotlin/Any|
public final fun scriptFunction(): R|kotlin/Int|
public? final? fun unusedScriptFunction(p: String): <implicit>
init
public final fun foo(i: R|kotlin/Int|, action: R|(kotlin/Int) -> kotlin/Unit|): R|kotlin/Unit|
public final val $$result: R|kotlin/Unit|
public get(): R|kotlin/Unit|
Type: kotlin.script.templates.standard.ScriptTemplateWithArgs
Label: <script>
Element 9
Scope: FirLocalScope
Properties:
FirValueParameterSymbol it: R|kotlin/Int|
Element 10
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] scriptInsideLastStatement.kts
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
SCRIPT: [ResolvedTo(RAW_FIR)] <script-scriptInsideLastStatement.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public final? [ResolvedTo(RAW_FIR)] class ScriptClass : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] constructor(): R|ScriptClass| {
LAZY_super<R|kotlin/Any|>
}
public? final? [ResolvedTo(RAW_FIR)] val memberProperty: <implicit> = LAZY_EXPRESSION
public? [ResolvedTo(RAW_FIR)] get(): <implicit>
}
public? final? [ResolvedTo(RAW_FIR)] fun scriptFunction(): <implicit> { LAZY_BLOCK }
public? final? [ResolvedTo(RAW_FIR)] fun unusedScriptFunction([ResolvedTo(RAW_FIR)] p: String): <implicit> { LAZY_BLOCK }
[ResolvedTo(RAW_FIR)] init { LAZY_BLOCK }
public? final? [ResolvedTo(RAW_FIR)] fun foo([ResolvedTo(RAW_FIR)] i: Int, [ResolvedTo(RAW_FIR)] action: ( (Int) -> Unit )): R|kotlin/Unit| { LAZY_BLOCK }
public final [ResolvedTo(BODY_RESOLVE)] val $$result: R|kotlin/Unit| = R|/foo|(R|/scriptFunction|(), <L> = [ResolvedTo(BODY_RESOLVE)] foo@fun <anonymous>([ResolvedTo(BODY_RESOLVE)] it: R|kotlin/Int|): R|kotlin/Unit| <inline=NoInline> {
R|/scriptFunction|()
}
)
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Unit|