我可以引用特定的函数重载吗? [英] Can I reference a specific function overload?
问题描述
给出以下代码
fun example() {}
fun example(name: String) {}
如何引用特定功能? IE. example()
或example(String)
?
How can I reference a specific function? I.e. example()
or example(String)
?
使用[example]
我无法指定我想要的功能.
Using [example]
I can't specify which exactly function I want.
推荐答案
目前您不能. Dokka在单个页面上生成函数的所有重载,并且链接指向该页面,因此您可以简单地将所需的重载指定为文本:"[example]的单参数重载".
At this time you can't. Dokka generates all overloads of a function on a single page, and the link points to that page, so you can simply specify the overload you need as text: "the one-argument overload of [example]".
存在一个公开问题,用于添加链接到特定超载的可能性,但是我们对建议的语法不太满意,因此我们没有明确的计划来支持此语法.
There is an open issue for adding the possibility to link to a specific overload, but we aren't too happy with the proposed syntax, so we don't have a definite plan to support this.
这篇关于我可以引用特定的函数重载吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!