-
Notifications
You must be signed in to change notification settings - Fork 410
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
Can't reference a specific function overload #80
Comments
Same problem here. |
It is never too late to answer a good suggestion ! 😅 |
This should 100% be supported, this is essential... |
How is this still not supported?! The suggested solution would look perfectly fine. |
Moreover, this missing feature may make documentation browsing a bit misleading. It may be possible to dodge overloading with default parameters in Kotlin, but impossible when operating with JDK classes. Consider the case when you mention Java method which has several overloads in your Kotlin doc of |
This still isn't supported? |
I agree this is needed |
Is it fixed? |
Looks like it's not. See the doc
Any news from JetBrains team? |
It may not be required for HTML outputs, but when linking to code in the IDE it is extremely frustrating to not be able to link to a specific overload. E.g. Clicking a link to |
I just came across this limitation and would definitely appreciate to see this fixed for the same reason: it is really annoying to have these "broken" links in my IDE. At the same time I'm not sure if this is something to be done in dokka in the first place. The Kotlin Spec doesn't say anything about how links into Kotlin code are specified or resolved (see Documentation comments). Instead there's a big TODO. I think the Spec should specify this first. Then (or maybe simultaneously) tools like dokka or any IDE can implement that. I assume IntelliJ/Android Studio doesn't use dokka internally anyway to resolve those links, so just implementing that in dokka wouldn't even help in my IDE. |
Strongly agreed! It's confusing to see those broken links. |
I've now renamed methods to avoid this issue, and not actually useful renames. Please consider supporting function overload targeting, especially since not all overloads are the result of defaults, but may take very different types (but do the same thing, and thus be usefully named the same. |
Same problem, this looks like something that just should be there. I'm trying to document some usage of the jdk Cipher's doFinal method, im trying to express the usage of |
still no updates on this? I can just repeat what others said: being unable to link a specific overload is really frustrating >< |
Sorry, still nothing from our side as this is a change in KDoc that must be done by the IntelliJ team, here's the relevant ticket: https://youtrack.jetbrains.com/issue/KT-15984 |
The new format here I've used here is also incorrect because KDocs don't currently support documentation for overloaded methods: Kotlin/dokka#80. So maybe this is the best compromise until they do add support
The new format here I've used here is also incorrect because KDocs don't currently support documentation for overloaded methods: Kotlin/dokka#80. So maybe this is the best compromise until they do add support
Still an issue in 2021 |
I have to give the function a different name. It's troublesome. |
This issue will celebrate 6th birthday soon and still no updates. |
Hi, yeah :) Unfortunately, this problem spans beyond dokka (kdoc spec, probably some compiler/ide work as well), so it's not as easy to fix, but it's definitely on our radar, we'll keep you posted if anything update-worthy comes up. |
This is actual for a function and a property with the same name: val name = ""
fun name() = "" |
Still an issue in 2023 |
And still in 2024 |
Adding my voice as someone who just went to do this, and found I could not....bummer. Also, to add a laugh, JetBrains AI Assistant lied to me and told me I could 🙃 ...lol - ai-telling-lies-about-kdoc.txt |
+1 |
1 similar comment
+1 |
Consider this scenario:
I have two or more methods with the same name but different parameters, just simple function overloads. Then I can't reference one of them explicitly in the documentation.
For example:
Something like
[fancy(Int)]
and[fancy(String, String)]
would be nice in the scenario, to separate the reference by parameter types and thus being able to reference one specific overload.The text was updated successfully, but these errors were encountered: