-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ambiguous link for properties from a primary constructor #3179
Comments
@see
Also relevant for plain symbol links, such as /**
* Enum class with param [x]
*/
enum class EnumKotlinParam(val x: String) {
NORTH("n"),
EAST("e")
} Related: #3334 |
JIC: A usage in the wild (if someone had doubts): https://github.com/square/okhttp/blob/0343ff823c17357c8e1994b4c0f0ea783dcace7a/mockwebserver/src/main/kotlin/mockwebserver3/SocketPolicy.kt#L83 |
This issues was addressed in Kotlin/KEEP#389 |
This example is from the Dokka unit test
documented seealso with reference to property for class
:Here
abc
is a parameter and property.From the point of IDE view, the link
[abc]
leads to the same position in a source file independently of whether theabc
is a parameter or property.From the point of generated documentation view, the link
[abc]
can lead to a parameter (currently, a constructor page) or a property page.In K1
@see abc
always refers to the propertyFoo.abc
.In K2 - to the parameter
abc
of constructor.Proposal
In KDoc there is the same way to assign documentation for a parameter and property from a constructor - only via block tags. So both links are possible.
To keep a link to the parameter,
[abc]
should lead to a parameter but[Foo.abc]
should lead to a property.The text was updated successfully, but these errors were encountered: