Two documentation questions


#1

I am adding KDoc to my library which is basically just a whole bunch of wrapper functions around a Java library, to better leverage operator overloading, nullability, and inline lambdas. The majority of my documentation currently consists of @see. But I’m running into an issue - I don’t know how to @see a constructor. I can @see a class, but not the constructor for that class which is what I’m intending to link to. How would I do that?

My second question: It feels kind of silly to have documentation which is one giant link to someone else’s documentation. Is there any parallel to Java’s {@inheritDoc}?


#2

No, there is not. See here: KtDoc / Dokka - @inheritDoc . Also note, IntelliJ will usually show the inherited kdoc, if no overriden kdoc is provided.


#3

It won’t auto-inherit the kdoc, no. It’s supposed to be inheriting the documentation from a completely separate function in a different class.


#4

How would inheritDoc work here then?


#5

Whoops, I was thinking of C#. You can add a cref parameter to <inheritdoc> and inherit documentation from a completely different symbol.