[LL FIR] add script tests for AbstractGetOrBuildFirTest

^KT-60728
This commit is contained in:
Dmitrii Gridin
2023-07-27 20:51:09 +02:00
parent a60abc6c06
commit 1515fbe99f
231 changed files with 4049 additions and 33 deletions
@@ -0,0 +1,7 @@
@Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
public annotation class Annotation(val name: String)
fun x() {}
@Annotation(<expr>"y"</expr>)
x()
@@ -0,0 +1,23 @@
KT element: KtValueArgument
FIR element: FirConstExpressionImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
String(y)
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] annotationApplicationArgumentOnStatement.kts
@R|kotlin/annotation/Target|[Types](allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.EXPRESSION|)) @R|kotlin/annotation/Retention|[Types](value = Q|kotlin/annotation/AnnotationRetention|.R|kotlin/annotation/AnnotationRetention.SOURCE|) public final [ResolvedTo(STATUS)] annotation class Annotation : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Annotation] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Annotation.name] name: R|kotlin/String|): R|Annotation| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val name: R|kotlin/String| = R|<local>/name|
public [ResolvedTo(STATUS)] [ContainingClassKey=Annotation] get(): R|kotlin/String|
}
public final [ResolvedTo(RAW_FIR)] fun x(): R|kotlin/Unit| {
}
public final [ResolvedTo(RAW_FIR)] val $$result: R|kotlin/Unit| = @R|Annotation|[Types](name = String(y)) R|/x|()
public [ResolvedTo(RAW_FIR)] get(): R|kotlin/Unit|
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,6 @@
public annotation class Annotation(val name: String)
@Annotation(<expr>"y"</expr>)
fun x() {
}
@@ -0,0 +1,21 @@
KT element: KtValueArgument
FIR element: FirConstExpressionImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
String(y)
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] annotationApplicationArgumentScript.kts
public final [ResolvedTo(STATUS)] annotation class Annotation : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Annotation] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Annotation.name] name: R|kotlin/String|): R|Annotation| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val name: R|kotlin/String| = R|<local>/name|
public [ResolvedTo(STATUS)] [ContainingClassKey=Annotation] get(): R|kotlin/String|
}
@R|Annotation|[Types](name = String(y)) public final [ResolvedTo(RAW_FIR)] fun x(): R|kotlin/Unit| {
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,5 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtConstructorCalleeExpression
@<expr>Suppress</expr>("")
fun x() {
}
@@ -0,0 +1,12 @@
KT element: KtConstructorCalleeExpression
FIR element: FirAnnotationCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
@R|kotlin/Suppress|[Types](names = vararg(String()))
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] annotationApplicationCallExpressionScript.kts
@R|kotlin/Suppress|[Types](names = vararg(String())) public final [ResolvedTo(RAW_FIR)] fun x(): R|kotlin/Unit| {
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,3 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
fun <reified T : Number> String.collectOfType(i: Int): Sequence<<expr>@kotlin.internal.NoInfer</expr> T> = 4
@@ -0,0 +1,13 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
@<ERROR TYPE REF: HIDDEN: kotlin/internal/NoInfer is invisible>[Unresolved]()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] annotationOnReturnTypeScript.kts
public final [ResolvedTo(RAW_FIR)] fun <reified [ResolvedTo(RAW_FIR)] T : R|kotlin/Number|> R|kotlin/String|.collectOfType([ResolvedTo(RAW_FIR)] i: R|kotlin/Int|): <ERROR TYPE REF: Symbol not found for Sequence> {
^collectOfType Int(4)
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,4 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
// WITH_STDLIB
<expr>@file:Suppress("")</expr>
@@ -0,0 +1,12 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
@FILE:R|kotlin/Suppress|[Types](names = vararg(String()))
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] fileAnnotationScript.kts
@FILE:R|kotlin/Suppress|[Types](names = vararg(String()))
[ResolvedTo(BODY_RESOLVE)] annotations container
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs
@@ -0,0 +1,2 @@
@Retention(AnnotationRetention.<expr>SOURCE</expr>)
annotation class Anno
@@ -0,0 +1,16 @@
KT element: KtNameReferenceExpression
FIR element: FirResolvedNamedReferenceImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
R|kotlin/annotation/AnnotationRetention.SOURCE|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] retentionValueScript.kts
@R|kotlin/annotation/Retention|[Types](value = Q|kotlin/annotation/AnnotationRetention|.R|kotlin/annotation/AnnotationRetention.SOURCE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor(): R|Anno| {
super<R|kotlin/Any|>()
}
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,7 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
// WITH_STDLIB
fun foo(){}
<expr>@Suppress("")</expr>
foo()
@@ -0,0 +1,14 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
@R|kotlin/Suppress|[Types](names = vararg(String()))
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] statementAnnotation.kts
public final [ResolvedTo(RAW_FIR)] fun foo(): R|kotlin/Unit| {
}
public final [ResolvedTo(RAW_FIR)] val $$result: R|kotlin/Unit| = @R|kotlin/Suppress|[Types](names = vararg(String())) R|/foo|()
public [ResolvedTo(RAW_FIR)] get(): R|kotlin/Unit|
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,8 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
@Target(AnnotationTarget.TYPE)
annotation class Anno
open class A
class B : <expr>@Anno</expr> A()
@@ -0,0 +1,28 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
@R|Anno|[Types]()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] superCallAnnotationScript.kts
@R|kotlin/annotation/Target|[Types](allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor(): R|Anno| {
super<R|kotlin/Any|>()
}
}
public open [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor(): R|A| {
super<R|kotlin/Any|>()
}
}
public final [ResolvedTo(STATUS)] class B : R|@R|Anno|() A| {
public [ResolvedTo(STATUS)] [ContainingClassKey=B] constructor(): R|B| {
super<R|@R|Anno|() A|>()
}
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,8 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtStringTemplateExpression
class ResolveMe(
addCommaWarning: @Anno(<expr>"abc"</expr>) Boolean = false
)
@Target(AnnotationTarget.TYPE)
annotation class Anno(val s: String)
@@ -0,0 +1,25 @@
KT element: KtStringTemplateExpression
FIR element: FirConstExpressionImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
String(abc)
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] typeOnAnnotationOnConstructorParameterExpressionScript.kts
public final [ResolvedTo(STATUS)] class ResolveMe : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=ResolveMe] constructor([ResolvedTo(STATUS)] addCommaWarning: R|@R|Anno|(s = String(abc)) kotlin/Boolean| = Boolean(false)): R|ResolveMe| {
super<R|kotlin/Any|>()
}
}
@R|kotlin/annotation/Target|[Types](allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.s] s: R|kotlin/String|): R|Anno| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val s: R|kotlin/String| = R|<local>/s|
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String|
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,13 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
// IGNORE_FIR
class ResolveMe(
addCommaWarning: <expr>@Anno</expr> Boolean = false
) : A() {
}
open class A
@Target(AnnotationTarget.TYPE)
annotation class Anno
@@ -0,0 +1,13 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
// IGNORE_FIR
class ResolveMe(
var addCommaWarning: <expr>@Anno</expr> Boolean = false,
) : A() {
}
open class A
@Target(AnnotationTarget.TYPE)
annotation class Anno
@@ -0,0 +1,13 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
// IGNORE_FIR
class ResolveMe(
var addCommaWarning: <expr>@Anno("abc")</expr> Boolean = false,
) : A() {
}
open class A
@Target(AnnotationTarget.TYPE)
annotation class Anno(val value: String)
@@ -0,0 +1,10 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
fun t(addCommaWarning: <expr>@Anno</expr> Boolean) {
}
open class A
@Target(AnnotationTarget.TYPE)
annotation class Anno
@@ -0,0 +1,24 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
@R|Anno|[Types]()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] typeOnAnnotationOnFunctionParameterScript.kts
public final [ResolvedTo(RAW_FIR)] fun t([ResolvedTo(RAW_FIR)] addCommaWarning: R|@R|Anno|() kotlin/Boolean|): R|kotlin/Unit| {
}
public open [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor(): R|A| {
super<R|kotlin/Any|>()
}
}
@R|kotlin/annotation/Target|[Types](allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor(): R|Anno| {
super<R|kotlin/Any|>()
}
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,10 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
fun t(addCommaWarning: <expr>@Anno("abcd")</expr> Boolean) {
}
open class A
@Target(AnnotationTarget.TYPE)
annotation class Anno(val value: String)
@@ -0,0 +1,27 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
@R|Anno|[Types](value = String(abcd))
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] typeOnAnnotationOnFunctionParameterWithArgumentsScript.kts
public final [ResolvedTo(RAW_FIR)] fun t([ResolvedTo(RAW_FIR)] addCommaWarning: R|@R|Anno|(value = String(abcd)) kotlin/Boolean|): R|kotlin/Unit| {
}
public open [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor(): R|A| {
super<R|kotlin/Any|>()
}
}
@R|kotlin/annotation/Target|[Types](allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.value] value: R|kotlin/String|): R|Anno| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val value: R|kotlin/String| = R|<local>/value|
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String|
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,6 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
fun <expr>@Anno("ab")</expr> Int.check() = 1
@Target(AnnotationTarget.TYPE)
annotation class Anno(val s: String)
@@ -0,0 +1,22 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
@R|Anno|[Types](s = String(ab))
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] typeOnAnnotationOnReceiverFunctionScript.kts
public final [ResolvedTo(RAW_FIR)] fun R|@R|Anno|(s = String(ab)) kotlin/Int|.check(): R|kotlin/Int| {
^check Int(1)
}
@R|kotlin/annotation/Target|[Types](allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.s] s: R|kotlin/String|): R|Anno| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val s: R|kotlin/String| = R|<local>/s|
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String|
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,6 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
fun <expr>@receiver:Anno("ab")</expr> Int.check() = 1
@Target(AnnotationTarget.TYPE)
annotation class Anno(val s: String)
@@ -0,0 +1,22 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: FromUseSiteTarget
FIR element rendered:
@RECEIVER:R|Anno|[Types](s = String(ab))
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] typeOnAnnotationOnReceiverParameterScript.kts
public final [ResolvedTo(RAW_FIR)] fun @RECEIVER:R|Anno|[Types](s = String(ab)) R|kotlin/Int|.check(): R|kotlin/Int| {
^check Int(1)
}
@R|kotlin/annotation/Target|[Types](allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.s] s: R|kotlin/String|): R|Anno| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val s: R|kotlin/String| = R|<local>/s|
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String|
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,6 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtTypeReference
val @<expr>Anno</expr>("a") Int.i: String get() = ""
@Target(AnnotationTarget.TYPE)
annotation class Anno(val s: String)
@@ -0,0 +1,23 @@
KT element: KtTypeReference
FIR element: FirResolvedTypeRefImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
R|Anno|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] typeOnAnnotationOnReceiverPropertyCallScript.kts
public final [ResolvedTo(RAW_FIR)] val R|@R|Anno|(s = String(a)) kotlin/Int|.i: R|kotlin/String|
public [ResolvedTo(RAW_FIR)] get(): R|kotlin/String| {
^ String()
}
@R|kotlin/annotation/Target|[Types](allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.s] s: R|kotlin/String|): R|Anno| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val s: R|kotlin/String| = R|<local>/s|
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String|
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,6 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
val <expr>@Anno("a")</expr> Int.i: String get() = ""
@Target(AnnotationTarget.TYPE)
annotation class Anno(val s: String)
@@ -0,0 +1,23 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
@R|Anno|[Types](s = String(a))
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] typeOnAnnotationOnReceiverPropertyScript.kts
public final [ResolvedTo(RAW_FIR)] val R|@R|Anno|(s = String(a)) kotlin/Int|.i: R|kotlin/String|
public [ResolvedTo(RAW_FIR)] get(): R|kotlin/String| {
^ String()
}
@R|kotlin/annotation/Target|[Types](allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.s] s: R|kotlin/String|): R|Anno| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val s: R|kotlin/String| = R|<local>/s|
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String|
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,6 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
fun check(): <expr>@Anno("ab")</expr> Int = 1
@Target(AnnotationTarget.TYPE)
annotation class Anno(val s: String)
@@ -0,0 +1,22 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
@R|Anno|[Types](s = String(ab))
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] typeOnAnnotationOnReturnFunctionScript.kts
public final [ResolvedTo(RAW_FIR)] fun check(): R|@R|Anno|(s = String(ab)) kotlin/Int| {
^check Int(1)
}
@R|kotlin/annotation/Target|[Types](allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.s] s: R|kotlin/String|): R|Anno| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val s: R|kotlin/String| = R|<local>/s|
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String|
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,6 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
val i: <expr>@Anno("ab")</expr> Int = 1
@Target(AnnotationTarget.TYPE)
annotation class Anno(val s: String)
@@ -0,0 +1,21 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
@R|Anno|[Types](s = String(ab))
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] typeOnAnnotationOnReturnPropertyScript.kts
public final [ResolvedTo(RAW_FIR)] val i: R|@R|Anno|(s = String(ab)) kotlin/Int| = Int(1)
public [ResolvedTo(RAW_FIR)] get(): R|@R|Anno|(s = String(ab)) kotlin/Int|
@R|kotlin/annotation/Target|[Types](allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.s] s: R|kotlin/String|): R|Anno| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val s: R|kotlin/String| = R|<local>/s|
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String|
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,8 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
annotation class Ann
class X {
<expr>@delegate:Ann</expr>
val a by lazy { 1 }
}
@@ -0,0 +1,30 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
@PROPERTY_DELEGATE_FIELD:R|Ann|[Types]()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] delegateScript.kts
public final [ResolvedTo(STATUS)] annotation class Ann : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Ann] constructor(): R|Ann| {
super<R|kotlin/Any|>()
}
}
public final [ResolvedTo(STATUS)] class X : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=X] constructor(): R|X| {
super<R|kotlin/Any|>()
}
field:@PROPERTY_DELEGATE_FIELD:R|Ann|[Types]() public final [ResolvedTo(STATUS)] val a: <ERROR TYPE REF: Unresolved name: getValue>by <Unresolved name: lazy>#(<L> = [ResolvedTo(RAW_FIR)] lazy@fun <anonymous>(): R|kotlin/Int| <inline=Unknown> {
^ Int(1)
}
)
public [ResolvedTo(STATUS)] [ContainingClassKey=X] get(): <ERROR TYPE REF: Unresolved name: getValue> {
^ this@R|/X|.D|/X.a|.<Unresolved name: getValue>#(this@R|/X|, ::R|/X.a|)
}
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,5 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
annotation class Ann
class X(<expr>@field:Ann</expr> var x: Int)
@@ -0,0 +1,26 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
@FIELD:R|Ann|[Types]()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] fieldScript.kts
public final [ResolvedTo(STATUS)] annotation class Ann : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Ann] constructor(): R|Ann| {
super<R|kotlin/Any|>()
}
}
public final [ResolvedTo(STATUS)] class X : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=X] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/X.x] x: R|kotlin/Int|): R|X| {
super<R|kotlin/Any|>()
}
field:@FIELD:R|Ann|[Types]() public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] var x: R|kotlin/Int| = R|<local>/x|
public [ResolvedTo(STATUS)] [ContainingClassKey=X] get(): R|kotlin/Int|
public [ResolvedTo(STATUS)] [ContainingClassKey=X] set([ResolvedTo(STATUS)] value: R|kotlin/Int|): R|kotlin/Unit|
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,5 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
<expr>@file:Ann</expr>
annotation class Ann
@@ -0,0 +1,18 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
@FILE:R|Ann|[Types]()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] fileScript.kts
@FILE:R|Ann|[Types]()
[ResolvedTo(BODY_RESOLVE)] annotations container
public final [ResolvedTo(RAW_FIR)] annotation class Ann : R|kotlin/Annotation| {
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Ann| {
super<R|kotlin/Any|>()
}
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,5 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
annotation class Ann
class X(<expr>@get:Ann</expr> var x: Int)
@@ -0,0 +1,26 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: FromUseSiteTarget
FIR element rendered:
@PROPERTY_GETTER:R|Ann|[Types]()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] getterScript.kts
public final [ResolvedTo(STATUS)] annotation class Ann : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Ann] constructor(): R|Ann| {
super<R|kotlin/Any|>()
}
}
public final [ResolvedTo(STATUS)] class X : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=X] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/X.x] x: R|kotlin/Int|): R|X| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] var x: R|kotlin/Int| = R|<local>/x|
@PROPERTY_GETTER:R|Ann|[Types]() public [ResolvedTo(STATUS)] [ContainingClassKey=X] get(): R|kotlin/Int|
public [ResolvedTo(STATUS)] [ContainingClassKey=X] set([ResolvedTo(STATUS)] value: R|kotlin/Int|): R|kotlin/Unit|
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,5 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
annotation class Ann
class X(<expr>@param:Ann</expr> var x: Int)
@@ -0,0 +1,26 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
@CONSTRUCTOR_PARAMETER:R|Ann|[Types]()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] paramScript.kts
public final [ResolvedTo(STATUS)] annotation class Ann : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Ann] constructor(): R|Ann| {
super<R|kotlin/Any|>()
}
}
public final [ResolvedTo(STATUS)] class X : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=X] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/X.x] @CONSTRUCTOR_PARAMETER:R|Ann|[Types]() x: R|kotlin/Int|): R|X| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] var x: R|kotlin/Int| = R|<local>/x|
public [ResolvedTo(STATUS)] [ContainingClassKey=X] get(): R|kotlin/Int|
public [ResolvedTo(STATUS)] [ContainingClassKey=X] set([ResolvedTo(STATUS)] value: R|kotlin/Int|): R|kotlin/Unit|
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,5 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
annotation class Ann
class X(<expr>@property:Ann</expr> var x: Int)
@@ -0,0 +1,26 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
@PROPERTY:R|Ann|[Types]()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] propertyScript.kts
public final [ResolvedTo(STATUS)] annotation class Ann : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Ann] constructor(): R|Ann| {
super<R|kotlin/Any|>()
}
}
public final [ResolvedTo(STATUS)] class X : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=X] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/X.x] x: R|kotlin/Int|): R|X| {
super<R|kotlin/Any|>()
}
@PROPERTY:R|Ann|[Types]() public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] var x: R|kotlin/Int| = R|<local>/x|
public [ResolvedTo(STATUS)] [ContainingClassKey=X] get(): R|kotlin/Int|
public [ResolvedTo(STATUS)] [ContainingClassKey=X] set([ResolvedTo(STATUS)] value: R|kotlin/Int|): R|kotlin/Unit|
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,5 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
annotation class Ann
class X(<expr>@setparam:Ann</expr> var x: Int)
@@ -0,0 +1,26 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: FromUseSiteTarget
FIR element rendered:
@SETTER_PARAMETER:R|Ann|[Types]()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] setParamScript.kts
public final [ResolvedTo(STATUS)] annotation class Ann : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Ann] constructor(): R|Ann| {
super<R|kotlin/Any|>()
}
}
public final [ResolvedTo(STATUS)] class X : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=X] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/X.x] x: R|kotlin/Int|): R|X| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] var x: R|kotlin/Int| = R|<local>/x|
public [ResolvedTo(STATUS)] [ContainingClassKey=X] get(): R|kotlin/Int|
public [ResolvedTo(STATUS)] [ContainingClassKey=X] set([ResolvedTo(STATUS)] @SETTER_PARAMETER:R|Ann|[Types]() value: R|kotlin/Int|): R|kotlin/Unit|
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,5 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
annotation class Ann
class X(<expr>@set:Ann</expr> var x: Int)
@@ -0,0 +1,26 @@
KT element: KtAnnotationEntry
FIR element: FirAnnotationCallImpl
FIR source kind: FromUseSiteTarget
FIR element rendered:
@PROPERTY_SETTER:R|Ann|[Types]()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] setterScript.kts
public final [ResolvedTo(STATUS)] annotation class Ann : R|kotlin/Annotation| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Ann] constructor(): R|Ann| {
super<R|kotlin/Any|>()
}
}
public final [ResolvedTo(STATUS)] class X : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=X] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/X.x] x: R|kotlin/Int|): R|X| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] var x: R|kotlin/Int| = R|<local>/x|
public [ResolvedTo(STATUS)] [ContainingClassKey=X] get(): R|kotlin/Int|
@PROPERTY_SETTER:R|Ann|[Types]() public [ResolvedTo(STATUS)] [ContainingClassKey=X] set([ResolvedTo(STATUS)] value: R|kotlin/Int|): R|kotlin/Unit|
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,5 @@
fun y(a: Int){}
fun x() {
y(<expr>1</expr>)
}
@@ -0,0 +1,15 @@
KT element: KtValueArgument
FIR element: FirConstExpressionImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
Int(1)
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] callArgumentScript.kts
public final [ResolvedTo(RAW_FIR)] fun y([ResolvedTo(RAW_FIR)] a: R|kotlin/Int|): R|kotlin/Unit| {
}
public final [ResolvedTo(RAW_FIR)] fun x(): R|kotlin/Unit| {
R|/y|(Int(1))
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,9 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtCallExpression
open class B(x: () -> Unit)
class A() : B(1, {
<expr>foo()</expr>
})
fun foo() {}
@@ -0,0 +1,27 @@
KT element: KtCallExpression
FIR element: FirFunctionCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
R|/foo|()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] callInsideLambdaInsideSuperCallAndExplicitConstructorScript.kts
public open [ResolvedTo(STATUS)] class B : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=B] constructor([ResolvedTo(STATUS)] x: R|() -> kotlin/Unit|): R|B| {
super<R|kotlin/Any|>()
}
}
public final [ResolvedTo(STATUS)] class A : R|B| {
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor(): R|A| {
super<R|B|>(Int(1), [ResolvedTo(RAW_FIR)] fun <anonymous>(): R|kotlin/Unit| <inline=Unknown> {
R|/foo|()
}
)
}
}
public final [ResolvedTo(RAW_FIR)] fun foo(): R|kotlin/Unit| {
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,5 @@
fun y<T>(){}
fun x() {
y< <expr>Int</expr> >()
}
@@ -0,0 +1,15 @@
KT element: KtTypeProjection
FIR element: FirTypeProjectionWithVarianceImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
R|kotlin/Int|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] calllTypeArgumentsScript.kts
public final [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] T> y(): R|kotlin/Unit| {
}
public final [ResolvedTo(RAW_FIR)] fun x(): R|kotlin/Unit| {
R|/y|<R|kotlin/Int|>()
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,2 @@
var i = 1
<expr>i += 1</expr>
@@ -0,0 +1,16 @@
KT element: KtScriptInitializer
FIR element: FirScriptImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
public final [ResolvedTo(RAW_FIR)] var i: R|kotlin/Int| = Int(1)
public [ResolvedTo(RAW_FIR)] get(): R|kotlin/Int|
public [ResolvedTo(RAW_FIR)] set([ResolvedTo(RAW_FIR)] value: R|kotlin/Int|): R|kotlin/Unit|
R|/i| = R|/i|.R|kotlin/Int.plus|(Int(1))[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] compoundAssignOnVarScript.kts
public final [ResolvedTo(RAW_FIR)] var i: R|kotlin/Int| = Int(1)
public [ResolvedTo(RAW_FIR)] get(): R|kotlin/Int|
public [ResolvedTo(RAW_FIR)] set([ResolvedTo(RAW_FIR)] value: R|kotlin/Int|): R|kotlin/Unit|
R|/i| = R|/i|.R|kotlin/Int.plus|(Int(1))[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,8 @@
interface MyMap<K, V> {
operator fun get(k: K): V
operator fun set(k: K, v: V)
}
fun test(m: MyMap<String, Int>) {
<expr>m["a"] += 1</expr>
}
@@ -0,0 +1,25 @@
KT element: KtBinaryExpression
FIR element: FirFunctionCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
R|<local>/<array>|.R|SubstitutionOverride</MyMap.set: R|kotlin/Unit|>|(R|<local>/<index_0>|, R|<local>/<array>|.R|SubstitutionOverride</MyMap.get: R|kotlin/Int|>|(R|<local>/<index_0>|).R|kotlin/Int.plus|(Int(1)))
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] compoundAssignWithArrayAccessConventionScript.kts
public abstract [ResolvedTo(STATUS)] interface MyMap<[ResolvedTo(STATUS)] K, [ResolvedTo(STATUS)] V> : R|kotlin/Any| {
public abstract operator [ResolvedTo(STATUS)] fun get([ResolvedTo(STATUS)] k: R|K|): R|V|
public abstract operator [ResolvedTo(STATUS)] fun set([ResolvedTo(STATUS)] k: R|K|, [ResolvedTo(STATUS)] v: R|V|): R|kotlin/Unit|
}
public final [ResolvedTo(RAW_FIR)] fun test([ResolvedTo(RAW_FIR)] m: R|MyMap<kotlin/String, kotlin/Int>|): R|kotlin/Unit| {
{
[ResolvedTo(RAW_FIR)] lval <array>: R|MyMap<kotlin/String, kotlin/Int>| = R|<local>/m|
[ResolvedTo(RAW_FIR)] lval <index_0>: R|kotlin/String| = String(a)
R|<local>/<array>|.R|SubstitutionOverride</MyMap.set: R|kotlin/Unit|>|(R|<local>/<index_0>|, R|<local>/<array>|.R|SubstitutionOverride</MyMap.get: R|kotlin/Int|>|(R|<local>/<index_0>|).R|kotlin/Int.plus|(Int(1)))
}
Unit
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,11 @@
interface A {
operator fun plusAssign(i: Int)
}
interface MyMap<K, V> {
operator fun get(k: K): V
}
fun test(m: MyMap<String, A>) {
<expr>m["a"] += 1</expr>
}
@@ -0,0 +1,22 @@
KT element: KtBinaryExpression
FIR element: FirFunctionCallImpl
FIR source kind: DesugaredCompoundAssignment
FIR element rendered:
R|<local>/m|.R|SubstitutionOverride</MyMap.get: R|A|>|(String(a)).R|/A.plusAssign|(Int(1))
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] compoundAssignWithArrayGetConventionScript.kts
public abstract [ResolvedTo(STATUS)] interface A : R|kotlin/Any| {
public abstract operator [ResolvedTo(STATUS)] fun plusAssign([ResolvedTo(STATUS)] i: R|kotlin/Int|): R|kotlin/Unit|
}
public abstract [ResolvedTo(STATUS)] interface MyMap<[ResolvedTo(STATUS)] K, [ResolvedTo(STATUS)] V> : R|kotlin/Any| {
public abstract operator [ResolvedTo(STATUS)] fun get([ResolvedTo(STATUS)] k: R|K|): R|V|
}
public final [ResolvedTo(RAW_FIR)] fun test([ResolvedTo(RAW_FIR)] m: R|MyMap<kotlin/String, A>|): R|kotlin/Unit| {
R|<local>/m|.R|SubstitutionOverride</MyMap.get: R|A|>|(String(a)).R|/A.plusAssign|(Int(1))
Unit
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,4 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtSuperTypeCallEntry
open class B(x: Int)
class A : <expr>B(1)</expr>
@@ -0,0 +1,22 @@
KT element: KtSuperTypeCallEntry
FIR element: FirDelegatedConstructorCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
super<R|B|>(Int(1))
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] constructorDelegationSuperCallScript.kts
public open [ResolvedTo(STATUS)] class B : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=B] constructor([ResolvedTo(STATUS)] x: R|kotlin/Int|): R|B| {
super<R|kotlin/Any|>()
}
}
public final [ResolvedTo(STATUS)] class A : R|B| {
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor(): R|A| {
super<R|B|>(Int(1))
}
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,9 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtValueArgumentList
fun callMe(x: Int, y: String) {
}
fun foo() {
callMe<expr>(1, "2")</expr>
}
@@ -0,0 +1,15 @@
KT element: KtValueArgumentList
FIR element: FirResolvedArgumentListImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
Int(1)String(2)
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] functionCallArgumentListScript.kts
public final [ResolvedTo(RAW_FIR)] fun callMe([ResolvedTo(RAW_FIR)] x: R|kotlin/Int|, [ResolvedTo(RAW_FIR)] y: R|kotlin/String|): R|kotlin/Unit| {
}
public final [ResolvedTo(RAW_FIR)] fun foo(): R|kotlin/Unit| {
R|/callMe|(Int(1), String(2))
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,5 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtValueArgumentList
fun foo(f: (Int, String) -> Unit) {
f<expr>(1, "2")</expr>
}
@@ -0,0 +1,13 @@
KT element: KtValueArgumentList
FIR element: FirResolvedArgumentListImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
Int(1)String(2)
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] invokeCallArgumentListScript.kts
public final [ResolvedTo(RAW_FIR)] fun foo([ResolvedTo(RAW_FIR)] f: R|(kotlin/Int, kotlin/String) -> kotlin/Unit|): R|kotlin/Unit| {
R|<local>/f|.R|SubstitutionOverride<kotlin/Function2.invoke: R|kotlin/Unit|>|(Int(1), String(2))
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,12 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtSimpleNameExpression
open class A(init: A.() -> Unit) {
val prop: String = ""
}
object B : A({})
object C : A(
{
fun foo() = B.<expr>prop</expr>.toString()
}
)
@@ -0,0 +1,40 @@
KT element: KtNameReferenceExpression
FIR element: FirResolvedNamedReferenceImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
R|/A.prop|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] qualifiedCallInsideSuperCallScript.kts
public open [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor([ResolvedTo(STATUS)] init: R|A.() -> kotlin/Unit|): R|A| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] val prop: R|kotlin/String| = String()
public [ResolvedTo(STATUS)] [ContainingClassKey=A] get(): R|kotlin/String|
}
public final [ResolvedTo(STATUS)] object B : R|A| {
private [ResolvedTo(STATUS)] [ContainingClassKey=B] constructor(): R|B| {
super<R|A|>([ResolvedTo(RAW_FIR)] fun R|A|.<anonymous>(): R|kotlin/Unit| <inline=Unknown> {
^ Unit
}
)
}
}
public final [ResolvedTo(STATUS)] object C : R|A| {
private [ResolvedTo(STATUS)] [ContainingClassKey=C] constructor(): R|C| {
super<R|A|>([ResolvedTo(RAW_FIR)] fun R|A|.<anonymous>(): R|kotlin/Unit| <inline=Unknown> {
local final [ResolvedTo(RAW_FIR)] fun foo(): R|kotlin/String| {
^foo Q|B|.R|/A.prop|.R|kotlin/String.toString|()
}
}
)
}
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,10 @@
package test
class B(val n: Int) {
operator fun set(i: Int, a: B) {}
operator fun get(i: Int) : B {}
operator fun inc() : B {}
}
var a = B(1)
<expr>a[2]</expr>++
@@ -0,0 +1,42 @@
KT element: KtArrayAccessExpression
FIR element: FirResolvedNamedReferenceImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
R|test/B.set|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] setOperatorScript.kts
package test
public final [ResolvedTo(STATUS)] class B : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=B] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=test/B.n] n: R|kotlin/Int|): R|test/B| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val n: R|kotlin/Int| = R|<local>/n|
public [ResolvedTo(STATUS)] [ContainingClassKey=B] get(): R|kotlin/Int|
public final operator [ResolvedTo(STATUS)] fun set([ResolvedTo(STATUS)] i: R|kotlin/Int|, [ResolvedTo(STATUS)] a: R|test/B|): R|kotlin/Unit| {
}
public final operator [ResolvedTo(STATUS)] fun get([ResolvedTo(STATUS)] i: R|kotlin/Int|): R|test/B| {
}
public final operator [ResolvedTo(STATUS)] fun inc(): R|test/B| {
}
}
public final [ResolvedTo(RAW_FIR)] var a: R|test/B| = R|test/B.B|(Int(1))
public [ResolvedTo(RAW_FIR)] get(): R|test/B|
public [ResolvedTo(RAW_FIR)] set([ResolvedTo(RAW_FIR)] value: R|test/B|): R|kotlin/Unit|
public final [ResolvedTo(RAW_FIR)] val $$result: R|test/B| = {
[ResolvedTo(RAW_FIR)] lval <array>: R|test/B| = R|test/a|
[ResolvedTo(RAW_FIR)] lval <index_0>: R|kotlin/Int| = Int(2)
[ResolvedTo(RAW_FIR)] lval <unary>: R|test/B| = R|<local>/<array>|.R|test/B.get|(R|<local>/<index_0>|)
R|<local>/<array>|.R|test/B.set|(R|<local>/<index_0>|, R|<local>/<unary>|.R|test/B.inc|())
R|<local>/<unary>|
}
public [ResolvedTo(RAW_FIR)] get(): R|test/B|
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,6 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtTypeReference
interface A
class C : <expr>A</expr> {
constructor()
}
@@ -0,0 +1,18 @@
KT element: KtTypeReference
FIR element: FirResolvedTypeRefImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
R|A|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] superTypeScript.kts
public abstract [ResolvedTo(STATUS)] interface A : R|kotlin/Any| {
}
public final [ResolvedTo(STATUS)] class C : R|A| {
public [ResolvedTo(STATUS)] [ContainingClassKey=C] constructor(): R|C| {
super<R|kotlin/Any|>()
}
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,3 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtParameter
class X(<expr>resolveMe: Int = 5</expr>)
@@ -0,0 +1,16 @@
KT element: KtParameter
FIR element: FirValueParameterImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
[ResolvedTo(STATUS)] resolveMe: R|kotlin/Int| = Int(5)
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] constructorParameterScript.kts
public final [ResolvedTo(STATUS)] class X : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=X] constructor([ResolvedTo(STATUS)] resolveMe: R|kotlin/Int| = Int(5)): R|X| {
super<R|kotlin/Any|>()
}
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,5 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtParameter
class Abc(<expr>val i: Int = 4</expr>) {
}
@@ -0,0 +1,19 @@
KT element: KtParameter
FIR element: FirValueParameterImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
[ResolvedTo(STATUS)] [CorrespondingProperty=/Abc.i] i: R|kotlin/Int| = Int(4)
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] constructorPropertyScript.kts
public final [ResolvedTo(STATUS)] class Abc : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Abc] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Abc.i] i: R|kotlin/Int| = Int(4)): R|Abc| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val i: R|kotlin/Int| = R|<local>/i|
public [ResolvedTo(STATUS)] [ContainingClassKey=Abc] get(): R|kotlin/Int|
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1 @@
val (<expr>o</expr>, r)
@@ -0,0 +1,14 @@
KT element: KtDestructuringDeclarationEntry
FIR element: FirPropertyImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
public final [ResolvedTo(RAW_FIR)] [DestructuringDeclarationContainerVariableKey=<local>/<destruct>] val o: <ERROR TYPE REF: Unresolved name: component1> = R|<local>/<destruct>|.<Unresolved name: component1>#()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] destructionWithNoRValueScript.kts
[ResolvedTo(RAW_FIR)] [DestructuringDeclarationContainerVariableMarkerKey=true] lval <destruct>: <ERROR TYPE REF: Initializer required for destructuring declaration> = ERROR_EXPR(Initializer required for destructuring declaration)public final [ResolvedTo(RAW_FIR)] [DestructuringDeclarationContainerVariableKey=<local>/<destruct>] val o: <ERROR TYPE REF: Unresolved name: component1> = R|<local>/<destruct>|.<Unresolved name: component1>#()
public final [ResolvedTo(RAW_FIR)] [DestructuringDeclarationContainerVariableKey=<local>/<destruct>] val r: <ERROR TYPE REF: Unresolved name: component2> = R|<local>/<destruct>|.<Unresolved name: component2>#()
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -1,8 +1,3 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// WITH_STDLIB
fun main() {
val (<expr>a</expr>, b) = 1 to 2
@@ -0,0 +1,4 @@
// WITH_STDLIB
fun main() {
val (<expr>a</expr>, b) = 1 to 2
}
@@ -0,0 +1,15 @@
KT element: KtDestructuringDeclarationEntry
FIR element: FirPropertyImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
[ResolvedTo(RAW_FIR)] lval a: R|kotlin/Int| = R|<local>/<destruct>|.R|SubstitutionOverride<kotlin/Pair.component1: R|kotlin/Int|>|()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] destructuringEntryScript.kts
public final [ResolvedTo(RAW_FIR)] fun main(): R|kotlin/Unit| {
[ResolvedTo(RAW_FIR)] lval <destruct>: R|kotlin/Pair<kotlin/Int, kotlin/Int>| = Int(1).R|kotlin/to|<R|kotlin/Int|, R|kotlin/Int|>(Int(2))
[ResolvedTo(RAW_FIR)] lval a: R|kotlin/Int| = R|<local>/<destruct>|.R|SubstitutionOverride<kotlin/Pair.component1: R|kotlin/Int|>|()
[ResolvedTo(RAW_FIR)] lval b: R|kotlin/Int| = R|<local>/<destruct>|.R|SubstitutionOverride<kotlin/Pair.component2: R|kotlin/Int|>|()
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,6 @@
// WITH_STDLIB
var a = -1
var b = 0
val pair = Pair(a, b)
<expr>val (first, last) = pair</expr>
@@ -0,0 +1,22 @@
KT element: KtDestructuringDeclaration
FIR element: FirPropertyImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
[ResolvedTo(RAW_FIR)] [DestructuringDeclarationContainerVariableMarkerKey=true] lval <destruct>: R|kotlin/Pair<kotlin/Int, kotlin/Int>| = R|/pair|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] destructuringScript.kts
public final [ResolvedTo(RAW_FIR)] var a: R|kotlin/Int| = Int(-1)
public [ResolvedTo(RAW_FIR)] get(): R|kotlin/Int|
public [ResolvedTo(RAW_FIR)] set([ResolvedTo(RAW_FIR)] value: R|kotlin/Int|): R|kotlin/Unit|
public final [ResolvedTo(RAW_FIR)] var b: R|kotlin/Int| = Int(0)
public [ResolvedTo(RAW_FIR)] get(): R|kotlin/Int|
public [ResolvedTo(RAW_FIR)] set([ResolvedTo(RAW_FIR)] value: R|kotlin/Int|): R|kotlin/Unit|
public final [ResolvedTo(RAW_FIR)] val pair: R|kotlin/Pair<kotlin/Int, kotlin/Int>| = R|kotlin/Pair.Pair|<R|kotlin/Int|, R|kotlin/Int|>(R|/a|, R|/b|)
public [ResolvedTo(RAW_FIR)] get(): R|kotlin/Pair<kotlin/Int, kotlin/Int>|
[ResolvedTo(RAW_FIR)] [DestructuringDeclarationContainerVariableMarkerKey=true] lval <destruct>: R|kotlin/Pair<kotlin/Int, kotlin/Int>| = R|/pair|public final [ResolvedTo(RAW_FIR)] [DestructuringDeclarationContainerVariableKey=<local>/<destruct>] val first: R|kotlin/Int| = R|<local>/<destruct>|.R|SubstitutionOverride<kotlin/Pair.component1: R|kotlin/Int|>|()
public final [ResolvedTo(RAW_FIR)] [DestructuringDeclarationContainerVariableKey=<local>/<destruct>] val last: R|kotlin/Int| = R|<local>/<destruct>|.R|SubstitutionOverride<kotlin/Pair.component2: R|kotlin/Int|>|()
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,5 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtObjectLiteralExpression
fun test() {
<expr>object {}</expr>
}
@@ -0,0 +1,24 @@
KT element: KtObjectLiteralExpression
FIR element: FirAnonymousObjectExpressionImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
object : R|kotlin/Any| {
private [ResolvedTo(RAW_FIR)] [ContainingClassKey=<anonymous>] constructor(): R|<anonymous>| {
super<R|kotlin/Any|>()
}
}
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] objectLiteralExpressionScript.kts
public final [ResolvedTo(RAW_FIR)] fun test(): R|kotlin/Unit| {
object : R|kotlin/Any| {
private [ResolvedTo(RAW_FIR)] [ContainingClassKey=<anonymous>] constructor(): R|<anonymous>| {
super<R|kotlin/Any|>()
}
}
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,5 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtObjectDeclaration
fun test() {
<expr>object {}</expr>
}
@@ -0,0 +1,24 @@
KT element: KtObjectDeclaration
FIR element: FirAnonymousObjectImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
object : R|kotlin/Any| {
private [ResolvedTo(RAW_FIR)] [ContainingClassKey=<anonymous>] constructor(): R|<anonymous>| {
super<R|kotlin/Any|>()
}
}
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] objectLiteralScript.kts
public final [ResolvedTo(RAW_FIR)] fun test(): R|kotlin/Unit| {
object : R|kotlin/Any| {
private [ResolvedTo(RAW_FIR)] [ContainingClassKey=<anonymous>] constructor(): R|<anonymous>| {
super<R|kotlin/Any|>()
}
}
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,2 @@
// WITH_STDLIB
val x <expr>by lazy {1}</expr>
@@ -0,0 +1,20 @@
KT element: KtPropertyDelegate
FIR element: FirFunctionCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
R|kotlin/lazy|<R|kotlin/Int|>(<L> = [ResolvedTo(RAW_FIR)] [MatchingParameterFunctionTypeKey=kotlin/Function0<T>] lazy@fun <anonymous>(): R|kotlin/Int| <inline=NoInline> {
^ Int(1)
}
)
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] propertyDelegateScript.kts
public final [ResolvedTo(RAW_FIR)] val x: R|kotlin/Int|by R|kotlin/lazy|<R|kotlin/Int|>(<L> = [ResolvedTo(RAW_FIR)] [MatchingParameterFunctionTypeKey=kotlin/Function0<T>] lazy@fun <anonymous>(): R|kotlin/Int| <inline=NoInline> {
^ Int(1)
}
)
public [ResolvedTo(RAW_FIR)] get(): R|kotlin/Int| {
^ D|/x|.R|kotlin/getValue|<R|kotlin/Int|>(Null(null), ::R|/x|)
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,3 @@
// WITH_STDLIB
fun <From, To> copyNotNull(from: List<From>, to: List<To>) where <expr>From</expr> : To, To : Any {
}
@@ -0,0 +1,12 @@
KT element: KtNameReferenceExpression
FIR element: FirTypeParameterImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
[ResolvedTo(RAW_FIR)] From : R|To|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] whereClause1Script.kts
public final [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] From : R|To|, [ResolvedTo(RAW_FIR)] To : R|kotlin/Any|> copyNotNull([ResolvedTo(RAW_FIR)] from: R|kotlin/collections/List<From>|, [ResolvedTo(RAW_FIR)] to: R|kotlin/collections/List<To>|): R|kotlin/Unit| {
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,3 @@
// WITH_STDLIB
fun <From, To> copyNotNull(from: List<From>, to: List<To>) where From : To, <expr>To</expr> : Any {
}
@@ -0,0 +1,12 @@
KT element: KtNameReferenceExpression
FIR element: FirTypeParameterImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
[ResolvedTo(RAW_FIR)] To : R|kotlin/Any|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] whereClause2Script.kts
public final [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] From : R|To|, [ResolvedTo(RAW_FIR)] To : R|kotlin/Any|> copyNotNull([ResolvedTo(RAW_FIR)] from: R|kotlin/collections/List<From>|, [ResolvedTo(RAW_FIR)] to: R|kotlin/collections/List<To>|): R|kotlin/Unit| {
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|
@@ -0,0 +1,4 @@
// WITH_STDLIB
fun foo(x: List<Int>) {
val a= <expr>x[1]</expr>
}
@@ -0,0 +1,13 @@
KT element: KtArrayAccessExpression
FIR element: FirFunctionCallImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
R|<local>/x|.R|SubstitutionOverride<kotlin/collections/List.get: R|kotlin/Int|>|(Int(1))
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] arrayAccessExpressionScript.kts
public final [ResolvedTo(RAW_FIR)] fun foo([ResolvedTo(RAW_FIR)] x: R|kotlin/collections/List<kotlin/Int>|): R|kotlin/Unit| {
[ResolvedTo(RAW_FIR)] lval a: R|kotlin/Int| = R|<local>/x|.R|SubstitutionOverride<kotlin/collections/List.get: R|kotlin/Int|>|(Int(1))
}
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|

Some files were not shown because too many files have changed in this diff Show More