33e6a85a2d
We exclude testData pattern from copyright scope
27 lines
338 B
Kotlin
Vendored
27 lines
338 B
Kotlin
Vendored
class Builder {
|
|
var version: String = ""
|
|
|
|
fun execute() {
|
|
println(version)
|
|
}
|
|
}
|
|
|
|
fun build(action: Builder.() -> Unit) = Builder().apply(action)
|
|
|
|
build {
|
|
version = "123"
|
|
class A {
|
|
fun doo() {
|
|
|
|
}
|
|
}
|
|
|
|
execute()
|
|
}
|
|
|
|
val builder = build {
|
|
version = "321"
|
|
}
|
|
|
|
builder.<expr>execute</expr>()
|