Is it possible to restrict `root` from nesting? `...
# announcements
i
Is it possible to restrict
root
from nesting?
Copy code
@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 :)