function so it takes the nearest receiver, whereas before it had to go all the way out to the root to find a receiver of type
Thing
j
Joffrey
11/09/2021, 10:59 PM
If you want to create DSLs like this, be sure to check out @DslMarker to avoid this kind of issues:
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-dsl-marker/
It prevents DSL functions declared on the outer elements from being used inside nested elements (unless you explicitly use a labeled syntax with