FIR IDE: move low level api testdata sources to the analysis directory
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
fun foo(f: Float.(Int, String) -> Boolean) {
|
||||
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
class A {
|
||||
val a = run {
|
||||
class X()
|
||||
|
||||
val y = 10
|
||||
}
|
||||
}
|
||||
|
||||
inline fun <R> run(block: () -> R): R {
|
||||
return block()
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
enum class A {
|
||||
X,
|
||||
Y,
|
||||
Z
|
||||
|
||||
;
|
||||
|
||||
fun foo(){}
|
||||
|
||||
val x = 10
|
||||
|
||||
fun bar() = 10
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
enum class A {
|
||||
X {
|
||||
fun localInX() = 1
|
||||
},
|
||||
Y {
|
||||
override fun foo() {}
|
||||
},
|
||||
Z,
|
||||
|
||||
;
|
||||
|
||||
open fun foo() {}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class A(val x: Int = 10, val b: String) {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class A {
|
||||
init {
|
||||
val x = 10
|
||||
class B
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val x = run {
|
||||
val inLambda = 10
|
||||
println(inLambda)
|
||||
inLambda
|
||||
}
|
||||
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
class Outer {
|
||||
val i: Int = 1
|
||||
get() {
|
||||
class Inner {
|
||||
var i: Int = 2
|
||||
get() {
|
||||
field++
|
||||
return field
|
||||
}
|
||||
val j: Int = 3
|
||||
get() {
|
||||
field = 42
|
||||
return field
|
||||
}
|
||||
|
||||
fun innerMember() {
|
||||
field++
|
||||
}
|
||||
}
|
||||
return field
|
||||
}
|
||||
|
||||
val j: Int = 4
|
||||
get() {
|
||||
fun local() {
|
||||
field++
|
||||
field++
|
||||
}
|
||||
local()
|
||||
return field
|
||||
}
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
fun local() = 0
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun foo() {
|
||||
fun local() {
|
||||
println("local")
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
fun foo1() = 10
|
||||
|
||||
fun foo2() {
|
||||
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
fun foo1() = 10
|
||||
|
||||
fun foo2() {
|
||||
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class A {
|
||||
typealias X = Int
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
class A {
|
||||
|
||||
}
|
||||
|
||||
class B {
|
||||
|
||||
}
|
||||
|
||||
class C {
|
||||
|
||||
}
|
||||
|
||||
class D {
|
||||
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun foo1() = 1
|
||||
|
||||
fun foo2() = 2
|
||||
|
||||
fun foo3() = 3
|
||||
|
||||
fun foo4() = 4
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
fun foo1() {
|
||||
println("foo1")
|
||||
}
|
||||
|
||||
fun foo2() {
|
||||
println("foo2")
|
||||
}
|
||||
|
||||
fun foo3() {
|
||||
println("foo3")
|
||||
}
|
||||
|
||||
fun foo4() {
|
||||
println("foo4")
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class A {
|
||||
class B {
|
||||
|
||||
}
|
||||
|
||||
object C {
|
||||
class D {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
fun y() {}
|
||||
|
||||
class B {
|
||||
fun x() {}
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
var x: Int = 10
|
||||
get() = field
|
||||
set(value) {
|
||||
println(1)
|
||||
field = value
|
||||
}
|
||||
|
||||
class X {
|
||||
var y: Int = 10
|
||||
get() = field
|
||||
set(value) {
|
||||
println(2)
|
||||
field = value
|
||||
}
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
var withGetterAndSetter: Int = 42
|
||||
get() = field
|
||||
set(value) {
|
||||
field = value
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class A(val x: Int = 10, val b: String) {
|
||||
constructor(i: Int) : this(x = 1, b = i.toString())
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
typealias A = 10
|
||||
@@ -0,0 +1,6 @@
|
||||
class A {/* NonReanalyzableDeclarationStructureElement */
|
||||
fun x() {/* ReanalyzableFunctionStructureElement */
|
||||
|
||||
}
|
||||
fun y(): Int = 10/* ReanalyzableFunctionStructureElement */
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class X {/* NonReanalyzableDeclarationStructureElement */
|
||||
var x: Int/* ReanalyzablePropertyStructureElement */
|
||||
get() = field
|
||||
set(value) {
|
||||
field = value
|
||||
}
|
||||
|
||||
val y = 42/* NonReanalyzableDeclarationStructureElement */
|
||||
|
||||
var z: Int = 15/* ReanalyzablePropertyStructureElement */
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class A {/* NonReanalyzableDeclarationStructureElement */
|
||||
val a = run {
|
||||
class X()
|
||||
|
||||
val y = 10
|
||||
}/* NonReanalyzableDeclarationStructureElement */
|
||||
}
|
||||
|
||||
inline fun <R> run(block: () -> R): R {/* ReanalyzableFunctionStructureElement */
|
||||
return block()
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
enum class A {/* NonReanalyzableDeclarationStructureElement */
|
||||
X,
|
||||
Y,
|
||||
Z
|
||||
|
||||
;
|
||||
|
||||
fun foo(){/* ReanalyzableFunctionStructureElement */}
|
||||
|
||||
val x = 10/* NonReanalyzableDeclarationStructureElement */
|
||||
|
||||
fun bar() = 10/* NonReanalyzableDeclarationStructureElement */
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
enum class A {/* NonReanalyzableDeclarationStructureElement */
|
||||
X {
|
||||
fun localInX() = 1
|
||||
},
|
||||
Y {
|
||||
override fun foo() {}
|
||||
},
|
||||
Z,
|
||||
|
||||
;
|
||||
|
||||
open fun foo() {/* ReanalyzableFunctionStructureElement */}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class A {/* NonReanalyzableDeclarationStructureElement */
|
||||
init {
|
||||
val x = 10
|
||||
class B
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fun a() {/* ReanalyzableFunctionStructureElement */
|
||||
class X
|
||||
}
|
||||
|
||||
class Y {/* NonReanalyzableDeclarationStructureElement */
|
||||
fun b() {/* ReanalyzableFunctionStructureElement */
|
||||
class Z
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
fun x() {/* ReanalyzableFunctionStructureElement */
|
||||
fun y() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class A {/* NonReanalyzableDeclarationStructureElement */
|
||||
fun z() {/* ReanalyzableFunctionStructureElement */
|
||||
fun q() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
fun foo() {/* ReanalyzableFunctionStructureElement */
|
||||
var x: Int
|
||||
}
|
||||
class A {/* NonReanalyzableDeclarationStructureElement */
|
||||
fun q() {/* ReanalyzableFunctionStructureElement */
|
||||
val y = 42
|
||||
}
|
||||
}
|
||||
class B {/* NonReanalyzableDeclarationStructureElement */
|
||||
class C {/* NonReanalyzableDeclarationStructureElement */
|
||||
fun u() {/* ReanalyzableFunctionStructureElement */
|
||||
var z: Int = 15
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A {/* NonReanalyzableDeclarationStructureElement */
|
||||
typealias X = Int/* NonReanalyzableDeclarationStructureElement */
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
class A {/* NonReanalyzableDeclarationStructureElement */
|
||||
class B {/* NonReanalyzableDeclarationStructureElement */
|
||||
fun x() {/* ReanalyzableFunctionStructureElement */
|
||||
}
|
||||
|
||||
class C {/* NonReanalyzableDeclarationStructureElement */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class E {/* NonReanalyzableDeclarationStructureElement */
|
||||
|
||||
}
|
||||
|
||||
fun y(): Int = 10/* ReanalyzableFunctionStructureElement */
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
var x: Int = 10/* ReanalyzablePropertyStructureElement */
|
||||
get() = field
|
||||
set(value) {
|
||||
field = value
|
||||
}
|
||||
|
||||
class X {/* NonReanalyzableDeclarationStructureElement */
|
||||
var y: Int = 10/* ReanalyzablePropertyStructureElement */
|
||||
get() = field
|
||||
set(value) {
|
||||
field = value
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
fun foo(): Int = 42/* ReanalyzableFunctionStructureElement */
|
||||
+1
@@ -0,0 +1 @@
|
||||
fun foo() = 42/* NonReanalyzableDeclarationStructureElement */
|
||||
@@ -0,0 +1,4 @@
|
||||
fun foo(): Int {/* ReanalyzableFunctionStructureElement */
|
||||
println("")
|
||||
return 10
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
var x: Int/* ReanalyzablePropertyStructureElement */
|
||||
get() = field
|
||||
set(value) {
|
||||
field = value
|
||||
}
|
||||
|
||||
val y = 42/* NonReanalyzableDeclarationStructureElement */
|
||||
|
||||
var z: Int = 15/* ReanalyzablePropertyStructureElement */
|
||||
@@ -0,0 +1,4 @@
|
||||
fun foo() {/* ReanalyzableFunctionStructureElement */
|
||||
println("")
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
typealias A = 10/* NonReanalyzableDeclarationStructureElement */
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
public annotation class Annotation(val name: String)
|
||||
|
||||
@Annotation(<expr>"y"</expr>)
|
||||
fun x() {
|
||||
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtValueArgument
|
||||
FIR element: FirConstExpressionImpl
|
||||
|
||||
FIR element rendered:
|
||||
String(y)
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtValueArgumentList
|
||||
|
||||
public annotation class Annotation(val name: String)
|
||||
|
||||
@Annotation<expr>("y")</expr>
|
||||
fun x() {
|
||||
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtValueArgumentList
|
||||
FIR element: FirResolvedArgumentListImpl
|
||||
|
||||
FIR element rendered:
|
||||
String(y)
|
||||
analysis/low-level-api-fir/testdata/getOrBuildFir/annotations/annotationApplicationCallExpression.kt
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtConstructorCalleeExpression
|
||||
@<expr>Suppress</expr>("")
|
||||
fun x() {
|
||||
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtConstructorCalleeExpression
|
||||
FIR element: FirAnnotationCallImpl
|
||||
|
||||
FIR element rendered:
|
||||
@R|kotlin/Suppress|(names = vararg(String()))
|
||||
analysis/low-level-api-fir/testdata/getOrBuildFir/annotations/annotationApplicationVarargArgument.kt
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
@Suppress("1", <expr>"2"</expr>)
|
||||
fun x() {
|
||||
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtValueArgument
|
||||
FIR element: FirConstExpressionImpl
|
||||
|
||||
FIR element rendered:
|
||||
String(2)
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
|
||||
<expr>@Suppress("")</expr>
|
||||
fun x() {
|
||||
|
||||
}
|
||||
analysis/low-level-api-fir/testdata/getOrBuildFir/annotations/annotationApplicationWithArguments.txt
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtAnnotationEntry
|
||||
FIR element: FirAnnotationCallImpl
|
||||
|
||||
FIR element rendered:
|
||||
@R|kotlin/Suppress|(names = vararg(String()))
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtAnnotationEntry
|
||||
// WITH_STDLIB
|
||||
|
||||
<expr>@file:Suppress("")</expr>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtAnnotationEntry
|
||||
FIR element: FirAnnotationCallImpl
|
||||
|
||||
FIR element rendered:
|
||||
@FILE:R|kotlin/Suppress|(names = vararg(String()))
|
||||
@@ -0,0 +1,5 @@
|
||||
fun y(a: Int){}
|
||||
|
||||
fun x() {
|
||||
y(<expr>1</expr>)
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
KT element: KtValueArgument
|
||||
FIR element: FirConstExpressionImpl
|
||||
|
||||
FIR element rendered:
|
||||
Int(1)
|
||||
@@ -0,0 +1,5 @@
|
||||
fun y<T>(){}
|
||||
|
||||
fun x() {
|
||||
y< <expr>Int</expr> >()
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtTypeProjection
|
||||
FIR element: FirTypeProjectionWithVarianceImpl
|
||||
|
||||
FIR element rendered:
|
||||
R|kotlin/Int|
|
||||
+4
@@ -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>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtSuperTypeCallEntry
|
||||
FIR element: FirDelegatedConstructorCallImpl
|
||||
|
||||
FIR element rendered:
|
||||
super<R|B|>(Int(1))
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class A(x: Int) {
|
||||
constructor(y: String) : <expr>this(1)</expr>
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtConstructorDelegationCall
|
||||
FIR element: FirDelegatedConstructorCallImpl
|
||||
|
||||
FIR element rendered:
|
||||
this<R|A|>(Int(1))
|
||||
+9
@@ -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>
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtValueArgumentList
|
||||
FIR element: FirResolvedArgumentListImpl
|
||||
|
||||
FIR element rendered:
|
||||
Int(1)String(2)
|
||||
+5
@@ -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>
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtValueArgumentList
|
||||
FIR element: FirResolvedArgumentListImpl
|
||||
|
||||
FIR element rendered:
|
||||
Int(1)String(2)
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
object A {
|
||||
fun y(a: Int){}
|
||||
}
|
||||
|
||||
fun x() {
|
||||
A.<expr>y(1)</expr>
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtCallExpression
|
||||
FIR element: FirFunctionCallImpl
|
||||
|
||||
FIR element rendered:
|
||||
Q|A|.R|/A.y|(Int(1))
|
||||
@@ -0,0 +1,7 @@
|
||||
object A {
|
||||
fun y(a: Int){}
|
||||
}
|
||||
|
||||
fun x() {
|
||||
<expr>A.y(1)</expr>
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtDotQualifiedExpression
|
||||
FIR element: FirFunctionCallImpl
|
||||
|
||||
FIR element rendered:
|
||||
Q|A|.R|/A.y|(Int(1))
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
// WITH_STDLIB
|
||||
val x <expr>by lazy {1}</expr>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
KT element: KtPropertyDelegate
|
||||
FIR element: FirFunctionCallImpl
|
||||
|
||||
FIR element rendered:
|
||||
R|kotlin/lazy|<R|kotlin/Int|>(<L> = lazy@fun <anonymous>(): R|kotlin/Int| <inline=NoInline> {
|
||||
^ Int(1)
|
||||
}
|
||||
)
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
// WITH_STDLIB
|
||||
val x by <expr>lazy {1}</expr>
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
KT element: KtCallExpression
|
||||
FIR element: FirFunctionCallImpl
|
||||
|
||||
FIR element rendered:
|
||||
R|kotlin/lazy|<R|kotlin/Int|>(<L> = lazy@fun <anonymous>(): R|kotlin/Int| <inline=NoInline> {
|
||||
^ Int(1)
|
||||
}
|
||||
)
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_STDLIB
|
||||
fun foo(x: List<Int>) {
|
||||
val a= <expr>x[1]</expr>
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtArrayAccessExpression
|
||||
FIR element: FirFunctionCallImpl
|
||||
|
||||
FIR element rendered:
|
||||
R|<local>/x|.R|SubstitutionOverride<kotlin/collections/List.get: R|kotlin/Int|>|(Int(1))
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo(x: Any): String {
|
||||
return <expr>x as String</expr>
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtBinaryExpressionWithTypeRHS
|
||||
FIR element: FirTypeOperatorCallImpl
|
||||
|
||||
FIR element rendered:
|
||||
(R|<local>/x| as R|kotlin/String|)
|
||||
+1
@@ -0,0 +1 @@
|
||||
val x = <expr>1 + 1</expr>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtBinaryExpression
|
||||
FIR element: FirFunctionCallImpl
|
||||
|
||||
FIR element rendered:
|
||||
Int(1).R|kotlin/Int.plus|(Int(1))
|
||||
+1
@@ -0,0 +1 @@
|
||||
val x = 1 <expr>+</expr> 1
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtOperationReferenceExpression
|
||||
FIR element: FirResolvedNamedReferenceImpl
|
||||
|
||||
FIR element rendered:
|
||||
R|kotlin/Int.plus|
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fun x() <expr> {
|
||||
|
||||
}
|
||||
</expr>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
KT element: KtBlockExpression
|
||||
FIR element: FirBlockImpl
|
||||
|
||||
FIR element rendered:
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
val x = <expr>true</expr>
|
||||
@@ -0,0 +1,5 @@
|
||||
KT element: KtConstantExpression
|
||||
FIR element: FirConstExpressionImpl
|
||||
|
||||
FIR element rendered:
|
||||
Boolean(true)
|
||||
+1
@@ -0,0 +1 @@
|
||||
val x = <expr>Int::class</expr>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtClassLiteralExpression
|
||||
FIR element: FirGetClassCallImpl
|
||||
|
||||
FIR element rendered:
|
||||
<getClass>(Q|kotlin/Int|)
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun foo() {
|
||||
<expr>
|
||||
for (x in 0..1) {
|
||||
|
||||
}
|
||||
</expr>
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
KT element: KtForExpression
|
||||
FIR element: FirWhileLoopImpl
|
||||
|
||||
FIR element rendered:
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval x: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtBinaryExpression
|
||||
fun foo() {
|
||||
for (x in <expr>0..1</expr>) {
|
||||
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtBinaryExpression
|
||||
FIR element: FirFunctionCallImpl
|
||||
|
||||
FIR element rendered:
|
||||
Int(0).R|kotlin/Int.rangeTo|(Int(1))
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun foo() {
|
||||
for (<expr>x</expr> in 0..1) {
|
||||
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtParameter
|
||||
FIR element: FirPropertyImpl
|
||||
|
||||
FIR element rendered:
|
||||
lval x: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo(x: Any): String {
|
||||
return <expr>if (x is String) "1" else "2"</expr>
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
KT element: KtIfExpression
|
||||
FIR element: FirWhenExpressionImpl
|
||||
|
||||
FIR element rendered:
|
||||
when () {
|
||||
(R|<local>/x| is R|kotlin/String|) -> {
|
||||
String(1)
|
||||
}
|
||||
else -> {
|
||||
String(2)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
val x = <expr>1</expr>
|
||||
@@ -0,0 +1,5 @@
|
||||
KT element: KtConstantExpression
|
||||
FIR element: FirConstExpressionImpl
|
||||
|
||||
FIR element rendered:
|
||||
Int(1)
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo(x: Any): Boolean {
|
||||
return <expr>x is String</expr>
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KT element: KtIsExpression
|
||||
FIR element: FirTypeOperatorCallImpl
|
||||
|
||||
FIR element rendered:
|
||||
(R|<local>/x| is R|kotlin/String|)
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_STDLIB
|
||||
val x = run <expr>{
|
||||
1
|
||||
}</expr>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
KT element: KtLambdaArgument
|
||||
FIR element: FirAnonymousFunctionExpressionImpl
|
||||
|
||||
FIR element rendered:
|
||||
run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
|
||||
^ Int(1)
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user