Files
kotlin-fork/compiler/visualizer/testData/uncommonCases/resultFiles/innerWith.kt
T
Ivan Cilcic fe328f8c7a Add some additional information to psi renderer
1) Trim unused spaces in annotations
2) Rewrote fq name rendering
3) Added annotations to for loop variable
4) Added type arguments render along to type parameters in functions
2019-08-30 11:50:32 +03:00

90 lines
1.7 KiB
Kotlin
Vendored

package p
class A {
// Int Int
// │ │
val aProp = 10
}
class B {
// Int Int
// │ │
val bProp = 1
}
fun foo(a: Int, b: Int): Int {
// fun <T, R> with<A, Int>(A, A.() -> Int): Int
// │ constructor A()
// │ │ with@0
// │ │ │
with(A()) {
// this@0
// val (A).aProp: Int
// │
aProp
// fun <T, R> with<B, Int>(B, B.() -> Int): Int
// │ constructor B()
// │ │ with@1
// │ │ │
with(B()) {
// this@0
// val (A).aProp: Int
// │
aProp
// this@1
// val (B).bProp: Int
// │
bProp
// this@0
// val (A).aProp: Int
// │
aProp
}
}
// fun <T, R> with<A, Int>(A, A.() -> Int): Int
// │ constructor A()
// │ │ with@0
// │ │ │
with(A()) {
// this@0
// val (A).aProp: Int
// │
aProp
// fun <T, R> with<B, Int>(B, B.() -> Int): Int
// │ constructor B()
// │ │ with@1
// │ │ │
with(B()) {
// this@0
// val (A).aProp: Int
// │
aProp
// this@1
// val (B).bProp: Int
// │
bProp
}
// fun <T, R> with<B, Int>(B, B.() -> Int): Int
// │ constructor B()
// │ │ with@1
// │ │ │
with(B()) {
// this@0
// val (A).aProp: Int
// │
aProp
// this@1
// val (B).bProp: Int
// │
bProp
}
}
// foo.a: Int
// │
return a
}