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
21 lines
444 B
Kotlin
21 lines
444 B
Kotlin
fun main(args : Array<String>) {
|
|
var x = 0
|
|
class A {
|
|
fun bar() {
|
|
fun local() {
|
|
class B {
|
|
fun baz() {
|
|
fun local2() {
|
|
x++
|
|
}
|
|
local2()
|
|
}
|
|
}
|
|
B().baz()
|
|
}
|
|
local()
|
|
}
|
|
}
|
|
A().bar()
|
|
println("OK")
|
|
} |