c68c4d3b6d
Now closure builder can contain includes. Includes
are another builders which closures must be added
to the building one.
Includes are:
For function closure:
call targets (including constructors)
callable reference targets
For class:
all children declarations
call targets (including constructors)
callable reference targets
For constructor:
call and callable reference targets
delegating constructor call target
constructing class closure
23 lines
359 B
Kotlin
23 lines
359 B
Kotlin
fun main(args : Array<String>) {
|
|
val x = 1
|
|
fun local0() = println(x)
|
|
fun local1() {
|
|
fun local2() {
|
|
local1()
|
|
}
|
|
local0()
|
|
}
|
|
|
|
fun l1() {
|
|
var x = 1
|
|
fun l2() {
|
|
fun l3() {
|
|
l1()
|
|
x = 5
|
|
}
|
|
l3()
|
|
}
|
|
}
|
|
|
|
println("OK")
|
|
} |