kotlin.DslMarker

DslMarker

@Target([AnnotationTarget.ANNOTATION_CLASS]) annotation class DslMarker

Platform and version requirements: Kotlin 1.1

When applied to annotation class X specifies that X defines a DSL language

The general rule:

  • an implicit receiver may belong to a DSL@X if marked with a corresponding DSL marker annotation
  • two implicit receivers of the same DSL are not accessible in the same scope
  • the closest one wins
  • other available receivers are resolved as usual, but if the resulting resolved call binds to such a receiver, it's a compilation error

Marking rule