Skip to content

[Bug] Parameter link unresolved with annotation before doc comment #4565

Description

@juliamcclellan

What is happening? What should have happened instead?

Starting in build 2.2.0-dev-417, if a function has both a visibility modifier and an annotation that appears before the function doc comment, kdoc links to the function parameters are unresolved.

Reproducer

@JvmOverloads
/**
 * @param i int parameter
 */
public fun foo(i: Int = 0) = Unit

Leads to WARN: Couldn't resolve link: [i] in the warning output. The warning doesn't occur if @JvmOverloads is moved to after the doc comment or if the public modifier is removed.

Dokka version

2.2.0-dev-417

Kotlin Gradle Plugin (KGP) version

No response

Android Gradle Plugin (AGP) version (if applicable)

No response

Build tool

Gradle

Project type

  • Kotlin Multiplatform (KMP)
  • Android
  • JVM
  • Other

Anything else? (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions