What is happening? What should have happened instead?
ktfmt sometimes moves the exception type for a @throws tag onto the next line if the exception type is very long. When this happens the parsed Throws doc tag has an empty string name, a null exceptionAddress, and the child P merges the text of the exception type and description.
Reproducer
/**
* @throws
* this.is.a.very.long.pkg.name.IllegalArgumentException
* for a bad argument
* @throws IllegalStateException for a bad state
*/
fun foo() = Unit
This is the documentation on the DFunction:
Description(root=CustomDocTag(children=[], params={}, name=MARKDOWN_FILE))
Throws(root=CustomDocTag(children=[P(children=[Text(body=this.is.a.very.long.pkg.name.IllegalArgumentException for a bad argument, children=[], params={})], params={})], params={}, name=MARKDOWN_FILE), name=, exceptionAddress=null)
Throws(root=CustomDocTag(children=[P(children=[Text(body=for a bad state, children=[], params={})], params={})], params={}, name=MARKDOWN_FILE), name=IllegalStateException, exceptionAddress=kotlin/IllegalStateException///PointingToDeclaration/)
Dokka version
2.2.0-dev-415
Kotlin Gradle Plugin (KGP) version
No response
Android Gradle Plugin (AGP) version (if applicable)
No response
Build tool
Gradle
Project type
Anything else? (optional)
No response
What is happening? What should have happened instead?
ktfmt sometimes moves the exception type for a
@throwstag onto the next line if the exception type is very long. When this happens the parsedThrowsdoc tag has an empty stringname, a nullexceptionAddress, and the childPmerges the text of the exception type and description.Reproducer
This is the documentation on the
DFunction:Dokka version
2.2.0-dev-415
Kotlin Gradle Plugin (KGP) version
No response
Android Gradle Plugin (AGP) version (if applicable)
No response
Build tool
Gradle
Project type
Anything else? (optional)
No response