https://kotlinlang.org logo
j

JoseF

06/17/2020, 9:26 AM
Hi, is there any way to have
required
parameters in
KotlinDsl
that are validated at compilation time?
i

Iaroslav Postovalov

06/17/2020, 11:18 AM
1. You can use constructors & functions with named parameters. 2. You can create a compiler plugin.
g

gildor

07/29/2020, 6:58 AM
compile plugin is overkill for dsl imo
param for block is way to go:
Copy code
someDlsBlock(requiredParam) {
 // do something
}