[AA] Add tests for KDoc reference resolution of non-static callables
^KTIJ-26003
This commit is contained in:
committed by
Space Team
parent
2acee69908
commit
3dbae89cdd
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: main.kt
|
||||
import dependency.JavaChild
|
||||
|
||||
/**
|
||||
* [JavaChild.<caret>myFun]
|
||||
*/
|
||||
fun test() {}
|
||||
|
||||
// FILE: dependency/JavaBase.java
|
||||
package dependency;
|
||||
|
||||
public class JavaBase {
|
||||
public void myFun() {}
|
||||
}
|
||||
|
||||
// FILE: dependency/JavaChild.java
|
||||
package dependency;
|
||||
|
||||
public class JavaChild extends JavaBase {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in dependency.JavaBase) open fun myFun()
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// FILE: main.kt
|
||||
import dependency.JavaBase
|
||||
|
||||
class KotlinChild : JavaBase()
|
||||
|
||||
/**
|
||||
* [KotlinChild.<caret>myFun]
|
||||
*/
|
||||
fun test() {}
|
||||
|
||||
// FILE: dependency/JavaBase.java
|
||||
package dependency;
|
||||
|
||||
public class JavaBase {
|
||||
public void myFun() {}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in dependency.JavaBase) open fun myFun()
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
class Foo {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
/**
|
||||
* [Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in Foo) fun foo()
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
interface Foo {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
/**
|
||||
* [Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in Foo) fun foo()
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
open class Bar {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
class Foo : Bar()
|
||||
|
||||
/**
|
||||
* [Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in Bar) fun foo()
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
interface Bar {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
abstract class Foo : Bar
|
||||
|
||||
/**
|
||||
* [Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in Bar) fun foo()
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
interface Baz {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
abstract class Bar : Baz
|
||||
|
||||
abstract class Foo : Bar()
|
||||
|
||||
/**
|
||||
* [Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in Baz) fun foo()
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// FILE: Foo.kt
|
||||
package foo
|
||||
|
||||
class Foo {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
package test
|
||||
|
||||
/**
|
||||
* [foo.Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in foo.Foo) fun foo()
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// FILE: Foo.kt
|
||||
package foo
|
||||
|
||||
interface Foo {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
package test
|
||||
|
||||
/**
|
||||
* [foo.Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in foo.Foo) fun foo()
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// FILE: Foo.kt
|
||||
package foo
|
||||
|
||||
open class Bar {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
class Foo : Bar()
|
||||
|
||||
// FILE: main.kt
|
||||
package test
|
||||
|
||||
/**
|
||||
* [foo.Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in foo.Bar) fun foo()
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// FILE: Foo.kt
|
||||
package foo
|
||||
|
||||
interface Bar {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
abstract class Foo : Bar
|
||||
|
||||
// FILE: main.kt
|
||||
package test
|
||||
|
||||
/**
|
||||
* [foo.Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in foo.Bar) fun foo()
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// FILE: Foo.kt
|
||||
package foo
|
||||
|
||||
interface Baz {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
abstract class Bar : Baz
|
||||
|
||||
abstract class Foo : Bar()
|
||||
|
||||
// FILE: main.kt
|
||||
package test
|
||||
|
||||
/**
|
||||
* [foo.Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in foo.Baz) fun foo()
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// FILE: Foo.kt
|
||||
package foo
|
||||
|
||||
class Foo {
|
||||
val foo: Int = 5
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
package test
|
||||
|
||||
/**
|
||||
* [foo.Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in foo.Foo) val foo: kotlin.Int
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// FILE: Foo.kt
|
||||
package foo
|
||||
|
||||
interface Foo {
|
||||
val foo: Int
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
package test
|
||||
|
||||
/**
|
||||
* [foo.Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in foo.Foo) val foo: kotlin.Int
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// FILE: Foo.kt
|
||||
package foo
|
||||
|
||||
open class Bar {
|
||||
val foo: Int = 5
|
||||
}
|
||||
|
||||
class Foo : Bar()
|
||||
|
||||
// FILE: main.kt
|
||||
package test
|
||||
|
||||
/**
|
||||
* [foo.Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in foo.Bar) val foo: kotlin.Int
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// FILE: Foo.kt
|
||||
package foo
|
||||
|
||||
interface Bar {
|
||||
val foo: Int
|
||||
}
|
||||
|
||||
abstract class Foo : Bar
|
||||
|
||||
// FILE: main.kt
|
||||
package test
|
||||
|
||||
/**
|
||||
* [foo.Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in foo.Bar) val foo: kotlin.Int
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// FILE: Foo.kt
|
||||
package foo
|
||||
|
||||
interface Baz {
|
||||
val foo: Int
|
||||
}
|
||||
|
||||
abstract class Bar : Baz
|
||||
|
||||
abstract class Foo : Bar()
|
||||
|
||||
// FILE: main.kt
|
||||
package test
|
||||
|
||||
/**
|
||||
* [foo.Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in foo.Baz) val foo: kotlin.Int
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
class Foo {
|
||||
val foo: Int = 5
|
||||
}
|
||||
|
||||
/**
|
||||
* [Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in Foo) val foo: kotlin.Int
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
interface Foo {
|
||||
val foo: Int
|
||||
}
|
||||
|
||||
/**
|
||||
* [Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in Foo) val foo: kotlin.Int
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
open class Bar {
|
||||
val foo: Int = 5
|
||||
}
|
||||
|
||||
class Foo : Bar()
|
||||
|
||||
/**
|
||||
* [Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in Bar) val foo: kotlin.Int
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
interface Bar {
|
||||
val foo: Int
|
||||
}
|
||||
|
||||
abstract class Foo : Bar
|
||||
|
||||
/**
|
||||
* [Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in Bar) val foo: kotlin.Int
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
interface Baz {
|
||||
val foo: Int
|
||||
}
|
||||
|
||||
abstract class Bar : Baz
|
||||
|
||||
abstract class Foo : Bar()
|
||||
|
||||
/**
|
||||
* [Foo.<caret>foo]
|
||||
*/
|
||||
fun usage() {}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in Baz) val foo: kotlin.Int
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
class A {
|
||||
fun toName(): String = ""
|
||||
}
|
||||
|
||||
/**
|
||||
* [A.<caret>toName.length]
|
||||
*/
|
||||
fun foo() {}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in A) fun toName(): kotlin.String
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
open class SuperClass {
|
||||
fun toName(): String = ""
|
||||
}
|
||||
|
||||
class A : SuperClass()
|
||||
|
||||
/**
|
||||
* [A.<caret>toName.length]
|
||||
*/
|
||||
fun foo() {}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in SuperClass) fun toName(): kotlin.String
|
||||
Reference in New Issue
Block a user