-
Notifications
You must be signed in to change notification settings - Fork 415
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
[K2] Ambiguous KDoc link with the same name #3451
Comments
fun x(){}
/**
* ref to [x]
*/
val x = 0 In K1 the But in the following example fun x(){}
val x = 0
/**
* ref to [x]
*/
val x2 = 0 K2 |
This is a question for the KDoc specification. Maybe we don't need to do anything, maybe some changes will be required on our side or on the Analysis API side. Depends on how we decide it should work |
K2 behavior for factory functions: /**
* [SomeCl] leads to the class
*/
class SomeCl(i: Int)
/**
* [SomeCl] leads to the factory function
* In K1, it leads to the class
* [a] and [b] lead to the params in K1 and K2
*/
fun SomeCl(i: Int, b: Int): SomeCl = TODO()
/**
* [SomeCl] leads to the class (In Dokka)
*/
fun other() {} Non-obvious side effect: (fix!?) /**
* [CoroutineScope.cancel] is resolved
*/
interface CoroutineScope
/**
* [CoroutineScope.cancel] is unresolved since here [CoroutineScope] is a function
*/
fun CoroutineScope(i:Int): CoroutineScope = TODO()
/**
* [CoroutineScope.cancel] is resolved
*/
fun CoroutineScope.cancel(): CoroutineScope = TODO()
|
one more case: public open class C2 {
class A2
}
public class A2
/**
* [A2] leads to C2.A2
*/
public class SomeClass : C2() |
This issues was addressed in Kotlin/KEEP#389 |
In K1
[AllKDocTagsClass]
leads toAllKDocTagsClass.AllKDocTagsClass
class.In K2 it leads to the first
AllKDocTagsClass
.Related: #3179
The text was updated successfully, but these errors were encountered: