Kotlin DSL isn't marked with @DslMarker
See original GitHub issueI think you force pushed the Kotlin branch and you must’ve forgot to recreate the annotation annotated with @DslMarker to mark the DSL methods as DSL methods.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
DSLMarker not limiting the scope of DSL - kotlin - Stack Overflow
It seems annotating the base class, in this case Tag , does the trick, that probably means all those other annotations serve no...
Read more >DslMarker - Kotlin Programming Language
an implicit receiver may belong to a DSL @X if marked with a corresponding DSL marker annotation; two implicit receivers of the same...
Read more >Kotlin DSL | Coding a DSL: 6— The @DslMarker annotation
These annotations are used to mark classes and receivers, preventing receivers marked with the same annotation to be accessed inside one another ...
Read more >@Kotlin DSL Tutorial - Ximedes
With it we define an annotation that is used to mark our code as our DSL language. @DslMarker annotation class PersonDsl. Now we...
Read more >Kotlin DSL: from Theory to Practice - Jmix
These languages are limited in functionalities but they are able to effectively address a certain problem. They allow to write not imperative code...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

https://github.com/BomBardyGamer/komponent/blob/master/src/main/kotlin/me/bardy/komponent/dsl/ComponentDSL.kt
Actually, there isn’t any official documentation about it, you’re right. That’s strange, since it’s perfectly fine to annotate functions with
@DslMarker, and it does work as intended on functions. I’m just suggesting you use the annotation because it makes the DSL easier to distinguish from regular code, and it looks nice in IntelliJ when it’s a different colour 😃Surely though, if you weren’t meant to use it on functions, either the compiler or an article on it would say so.