Is there a way to include a code sample that defin...
# dokka
i
Is there a way to include a code sample that defines some new sealed classes in a kdoc? I’m aware of
@snippet
but that requires that the code be in a function, and I can’t declare sealed classes inside a function. I’ve also tried using the triple-backticks to embed the code directly, but for some reason that doesn’t seem to retain indenting (at least in the Intellij preview of the kdoc)
s
For this time, use triple-backticks, and, please fill feature request for
@sample
to support sealed classes. http://kotl.in/issue
i
It’s not a question of @sample not supporting sealed classes, it is a question of sealed classes not being defined within the scope of a function
s
I mean, that now it impossible to use sample to point not to functions, so it can't be used to include sealed classes or inline functions to example