KT-61890 [AA] Add testdata to ensure KDoc completion support in IDE
Completion in the IDE relies on correct scopes for KDoc positions. So we add testData for `KtScopeProvider` and `ContextCollector` to ensure that there are no regressions
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
class ContextReceiver
|
||||
|
||||
<expr>context(ContextReceiver)
|
||||
class MyClass<T>(param: String)</expr>
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
Tower Data Context:
|
||||
Element 0
|
||||
Scope: FirDefaultStarImportingScope
|
||||
Element 1
|
||||
Scope: FirDefaultSimpleImportingScope
|
||||
Element 2
|
||||
Scope: FirExplicitStarImportingScope
|
||||
Element 3
|
||||
Scope: FirDefaultSimpleImportingScope
|
||||
Element 4
|
||||
Scope: FirDefaultSimpleImportingScope
|
||||
Element 5
|
||||
Scope: FirPackageMemberScope
|
||||
Element 6
|
||||
Scope: FirExplicitSimpleImportingScope
|
||||
Element 7
|
||||
Scope: FirMemberTypeParameterScope
|
||||
Classifiers:
|
||||
FirTypeParameterSymbol T
|
||||
Element 8
|
||||
Implicit receiver:
|
||||
FirRegularClassSymbol context(R|test/ContextReceiver|)
|
||||
public final class MyClass<T> : R|kotlin/Any|
|
||||
Type: test.MyClass<T>
|
||||
Element 9
|
||||
Context receivers:
|
||||
FirRegularClassSymbol context(R|test/ContextReceiver|)
|
||||
public final class MyClass<T> : R|kotlin/Any|
|
||||
Type: test.ContextReceiver
|
||||
Label: ContextReceiver
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] wholeDeclaration_class.kt
|
||||
public final [ResolvedTo(STATUS)] class ContextReceiver : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] constructor(): R|test/ContextReceiver| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
context(R|test/ContextReceiver|)
|
||||
public final [ResolvedTo(STATUS)] class MyClass<[ResolvedTo(STATUS)] T> : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] constructor<[ResolvedTo(STATUS)] T>([ResolvedTo(STATUS)] param: R|kotlin/String|): R|test/MyClass<T>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
class ContextReceiver
|
||||
|
||||
class Receiver
|
||||
|
||||
<expr>context(ContextReceiver)
|
||||
fun <T> Receiver.test(param: String): T {}</expr>
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
Tower Data Context:
|
||||
Element 0
|
||||
Scope: FirDefaultStarImportingScope
|
||||
Element 1
|
||||
Scope: FirDefaultSimpleImportingScope
|
||||
Element 2
|
||||
Scope: FirExplicitStarImportingScope
|
||||
Element 3
|
||||
Scope: FirDefaultSimpleImportingScope
|
||||
Element 4
|
||||
Scope: FirDefaultSimpleImportingScope
|
||||
Element 5
|
||||
Scope: FirPackageMemberScope
|
||||
Element 6
|
||||
Scope: FirExplicitSimpleImportingScope
|
||||
Element 7
|
||||
Scope: FirMemberTypeParameterScope
|
||||
Classifiers:
|
||||
FirTypeParameterSymbol T
|
||||
Element 8
|
||||
Scope: FirLocalScope
|
||||
Properties:
|
||||
FirValueParameterSymbol param: R|kotlin/String|
|
||||
Element 9
|
||||
Context receivers:
|
||||
FirNamedFunctionSymbol context(R|test/ContextReceiver|)
|
||||
public final fun <T> R|test/Receiver|.test(param: R|kotlin/String|): R|T|
|
||||
Type: test.ContextReceiver
|
||||
Label: ContextReceiver
|
||||
Element 10
|
||||
Implicit receiver:
|
||||
FirNamedFunctionSymbol context(R|test/ContextReceiver|)
|
||||
public final fun <T> R|test/Receiver|.test(param: R|kotlin/String|): R|T|
|
||||
Type: test.Receiver
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] wholeDeclaration_fun.kt
|
||||
public final [ResolvedTo(STATUS)] class ContextReceiver : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] constructor(): R|test/ContextReceiver| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class Receiver : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] constructor(): R|test/Receiver| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
context(R|test/ContextReceiver|)
|
||||
public final [ResolvedTo(BODY_RESOLVE)] fun <[ResolvedTo(BODY_RESOLVE)] T> R|test/Receiver|.test([ResolvedTo(BODY_RESOLVE)] param: R|kotlin/String|): R|T| {
|
||||
}
|
||||
Reference in New Issue
Block a user