[LL FIR] add more tests for script initializer
^KT-65344
This commit is contained in:
committed by
Space Team
parent
08332fdc6e
commit
f972c8d239
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: KtScriptInitializer
|
||||
fun foo() = 24
|
||||
<expr>foo()</expr>
|
||||
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
KT element: KtScriptInitializer
|
||||
FIR element: FirScriptImpl
|
||||
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|
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] syntheticResultDeclarationInitializer.kts
|
||||
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|
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: KtScriptInitializer
|
||||
fun foo() = 4
|
||||
|
||||
<expr>foo()</expr>
|
||||
bar()
|
||||
|
||||
fun bar() {
|
||||
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
KT element: KtScriptInitializer
|
||||
FIR element: FirAnonymousInitializerImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
[ResolvedTo(BODY_RESOLVE)] init {
|
||||
R|/foo|()
|
||||
}
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] firstStatement.kts
|
||||
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
|
||||
SCRIPT: [ResolvedTo(BODY_RESOLVE)] <script-firstStatement.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(4)
|
||||
}
|
||||
|
||||
[ResolvedTo(BODY_RESOLVE)] init {
|
||||
R|/foo|()
|
||||
}
|
||||
|
||||
[ResolvedTo(BODY_RESOLVE)] init {
|
||||
R|/bar|()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(CONTRACTS)] fun bar(): R|kotlin/Unit| {
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: KtCallExpression
|
||||
fun foo() = 4
|
||||
|
||||
<expr>foo()</expr>
|
||||
bar()
|
||||
|
||||
fun bar() {
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
KT element: KtCallExpression
|
||||
FIR element: FirFunctionCallImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
R|/foo|()
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] firstStatementCall.kts
|
||||
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
|
||||
SCRIPT: [ResolvedTo(BODY_RESOLVE)] <script-firstStatementCall.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(4)
|
||||
}
|
||||
|
||||
[ResolvedTo(BODY_RESOLVE)] init {
|
||||
R|/foo|()
|
||||
}
|
||||
|
||||
[ResolvedTo(BODY_RESOLVE)] init {
|
||||
R|/bar|()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(CONTRACTS)] fun bar(): R|kotlin/Unit| {
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: KtScriptInitializer
|
||||
fun foo() = 4
|
||||
|
||||
foo()
|
||||
<expr>bar()</expr>
|
||||
|
||||
fun bar() {
|
||||
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
KT element: KtScriptInitializer
|
||||
FIR element: FirAnonymousInitializerImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
[ResolvedTo(BODY_RESOLVE)] init {
|
||||
R|/bar|()
|
||||
}
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] secondStatement.kts
|
||||
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
|
||||
SCRIPT: [ResolvedTo(BODY_RESOLVE)] <script-secondStatement.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(4)
|
||||
}
|
||||
|
||||
[ResolvedTo(BODY_RESOLVE)] init {
|
||||
R|/foo|()
|
||||
}
|
||||
|
||||
[ResolvedTo(BODY_RESOLVE)] init {
|
||||
R|/bar|()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(CONTRACTS)] fun bar(): R|kotlin/Unit| {
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: KtCallExpression
|
||||
fun foo() = 4
|
||||
|
||||
foo()
|
||||
<expr>bar()</expr>
|
||||
|
||||
fun bar() {
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
KT element: KtCallExpression
|
||||
FIR element: FirFunctionCallImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
R|/bar|()
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] secondStatementCall.kts
|
||||
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
|
||||
SCRIPT: [ResolvedTo(BODY_RESOLVE)] <script-secondStatementCall.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(4)
|
||||
}
|
||||
|
||||
[ResolvedTo(BODY_RESOLVE)] init {
|
||||
R|/foo|()
|
||||
}
|
||||
|
||||
[ResolvedTo(BODY_RESOLVE)] init {
|
||||
R|/bar|()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(CONTRACTS)] fun bar(): R|kotlin/Unit| {
|
||||
}
|
||||
Reference in New Issue
Block a user