AbstractClosureAnnotator for IR.
This commit is contained in:
committed by
Dmitry Petrov
parent
ceeccfa1b7
commit
ec2cfd2389
@@ -0,0 +1,7 @@
|
||||
Closure for function test2:
|
||||
receiver for outer
|
||||
variable y
|
||||
|
||||
Closure for function test1:
|
||||
receiver for outer
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
fun String.outer(x: Int) {
|
||||
fun test1(x: Int, y: Int) {
|
||||
fun test2(x: Int) = this + x + y
|
||||
test2(y).length + x + y
|
||||
}
|
||||
test1(x, x * x)
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
Closure for constructor <no name provided>:
|
||||
|
||||
Closure for function test1:
|
||||
'this' for C
|
||||
|
||||
Closure for function <anonymous>:
|
||||
'this' for C
|
||||
'this' for <no name provided>
|
||||
|
||||
Closure for function test2:
|
||||
'this' for C
|
||||
|
||||
Closure for class <no name provided>:
|
||||
'this' for C
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
class C {
|
||||
fun foo() = object {
|
||||
fun test1() = this@C.toString() + this.toString()
|
||||
fun test2() = { this@C.toString() + this.toString() }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
Closure for constructor <no name provided>:
|
||||
|
||||
Closure for function test6:
|
||||
|
||||
Closure for class <no name provided>:
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
fun Int.test1(x: Int) = this + x
|
||||
|
||||
class Test2(val x: Int) {
|
||||
fun test3() = x
|
||||
fun Int.test4() = this + x
|
||||
}
|
||||
|
||||
val test5 = object {
|
||||
fun Int.test6(x: Int) = this + x
|
||||
}
|
||||
Reference in New Issue
Block a user