KT-62695 [AA] Better resolve ambiguous receiver types in KDocReferenceResolver
When encountering multiple available same named types, resolve all of them together with corresponding extensions. This aligns well with the current resolve behavior of classes with the same name (see `SameNameClassesFromStarImports.kt`) Also, add extra test for resolving the ambiguous type without the extension function. The behavior is the same - resolve to the both classes.
This commit is contained in:
committed by
Space Team
parent
e5c6a5bac3
commit
d45662c2c3
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
// FILE: main.kt
|
||||
package test
|
||||
|
||||
import dep2.*
|
||||
import dep1.*
|
||||
|
||||
/**
|
||||
* [<caret_1>Foo]
|
||||
*
|
||||
* [dep1.<caret_2>Foo]
|
||||
* [dep2.<caret_3>Foo]
|
||||
*/
|
||||
fun test() {}
|
||||
|
||||
// FILE: dep1.kt
|
||||
package dep1
|
||||
|
||||
class Foo
|
||||
|
||||
// FILE: dep2.kt
|
||||
package dep2
|
||||
|
||||
class Foo
|
||||
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
<caret_1> resolved to:
|
||||
0: (in dep1) class Foo
|
||||
1: (in dep2) class Foo
|
||||
|
||||
<caret_2> resolved to:
|
||||
0: (in dep1) class Foo
|
||||
|
||||
<caret_3> resolved to:
|
||||
0: (in dep2) class Foo
|
||||
Reference in New Issue
Block a user