irus
02/27/2017, 9:10 PMroot
from nesting?
@DslMarker
@Target(AnnotationTarget.CLASS, AnnotationTarget.TYPE)
annotation class ConfigMarker
@ConfigMarker
class Root
fun root(body: (@ConfigMarker Root).() -> Unit) { }
fun main(args: Array<String>) {
root {
root { // <- this should be compiler error
}
}
}
(with new DslMarker, i know about @Deprecated
approach :)