K2 scripting: treat default import similarly to K1
namely, add them to importing scopes directly and according to the schema used for other implicit imports, rather than adding them to the regular script file imports. See KT-65982 for explanation. #KT-65982 fixed
This commit is contained in:
committed by
Space Team
parent
9037975758
commit
266447120d
Vendored
+10
-6
@@ -4,14 +4,18 @@ Tower Data Context:
|
||||
Element 1
|
||||
Scope: FirExplicitStarImportingScope
|
||||
Element 2
|
||||
Scope: FirDefaultSimpleImportingScope
|
||||
Scope: FirExplicitStarImportingScope
|
||||
Element 3
|
||||
Scope: FirDefaultSimpleImportingScope
|
||||
Element 4
|
||||
Scope: FirPackageMemberScope
|
||||
Scope: FirDefaultSimpleImportingScope
|
||||
Element 5
|
||||
Scope: FirExplicitSimpleImportingScope
|
||||
Element 6
|
||||
Scope: FirPackageMemberScope
|
||||
Element 7
|
||||
Scope: FirExplicitSimpleImportingScope
|
||||
Element 8
|
||||
Scope: FirScriptDeclarationsScope
|
||||
Classifiers:
|
||||
FirRegularClassSymbol public final? class After_OtherClass : R|kotlin/Any|
|
||||
@@ -25,11 +29,11 @@ Tower Data Context:
|
||||
public get(): R|kotlin/Int|
|
||||
FirPropertySymbol public final val before_Val: R|kotlin/Int|
|
||||
public get(): R|kotlin/Int|
|
||||
Element 7
|
||||
Element 9
|
||||
Scope: FirLocalScope
|
||||
Functions
|
||||
FirNamedFunctionSymbol public final fun usage(foo: R|kotlin/Int|): R|kotlin/Unit|
|
||||
Element 8
|
||||
Element 10
|
||||
Context receivers:
|
||||
FirScriptSymbol context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
|
||||
SCRIPT: <script-insideTopLevelFunction.kts>
|
||||
@@ -48,11 +52,11 @@ Tower Data Context:
|
||||
public final? class After_OtherClass : R|kotlin/Any|
|
||||
Type: kotlin.script.templates.standard.ScriptTemplateWithArgs
|
||||
Label: <script>
|
||||
Element 9
|
||||
Element 11
|
||||
Scope: FirLocalScope
|
||||
Properties:
|
||||
FirValueParameterSymbol foo: R|kotlin/Int|
|
||||
Element 10
|
||||
Element 12
|
||||
Scope: FirLocalScope
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] insideTopLevelFunction.kts
|
||||
|
||||
Reference in New Issue
Block a user