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
16 lines
258 B
Kotlin
16 lines
258 B
Kotlin
fun main(args: Array<String>) {
|
|
var a = 0
|
|
fun local() {
|
|
class A {
|
|
val b = 0
|
|
fun f() {
|
|
a = b
|
|
}
|
|
|
|
}
|
|
fun local2() : A {
|
|
return A()
|
|
}
|
|
}
|
|
println("OK")
|
|
} |