[Analysis API] Add more ContextCollector tests inspired by dependentCopy

As the on-air analysis is obsolete, related tests are going to be
deleted. Here we add cases not yet covered by 'ContextCollector' tests.
This commit is contained in:
Yan Zhulanow
2024-01-11 17:34:34 +09:00
committed by Space Team
parent 0502da474b
commit 08727bf0be
23 changed files with 966 additions and 0 deletions
@@ -0,0 +1,42 @@
Tower Data Context:
Element 0
Scope: FirDefaultStarImportingScope
Element 1
Scope: FirExplicitStarImportingScope
Element 2
Scope: FirDefaultSimpleImportingScope
Element 3
Scope: FirDefaultSimpleImportingScope
Element 4
Scope: FirPackageMemberScope
Element 5
Scope: FirExplicitSimpleImportingScope
Element 6
Implicit receiver:
FirRegularClassSymbol public final companion object Companion : R|test/MyInterface|
Type: test.MyClass.Companion
Element 7
Scope: FirNestedClassifierScopeImpl
Classifiers:
FirRegularClassSymbol public final companion object Companion : R|test/MyInterface|
Element 8
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] superTypeDelegatedToCompanion.kt
public final? [ResolvedTo(RAW_FIR)] interface MyInterface : R|kotlin/Any| {
}
public final [ResolvedTo(STATUS)] class MyClass : R|test/MyInterface| {
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/MyClass| {
super<R|kotlin/Any|>()
}
private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|test/MyInterface| = Q|test/MyClass.Companion|
public final companion [ResolvedTo(STATUS)] object Companion : R|test/MyInterface| {
private [ResolvedTo(RAW_FIR)] constructor(): R|test/MyClass.Companion| {
LAZY_super<<implicit>>
}
}
}
@@ -0,0 +1,7 @@
package test
interface MyInterface
class MyClass: MyInterface by <expr>Companion</expr> {
companion object : MyInterface
}
@@ -0,0 +1,42 @@
Tower Data Context:
Element 0
Scope: FirDefaultStarImportingScope
Element 1
Scope: FirExplicitStarImportingScope
Element 2
Scope: FirDefaultSimpleImportingScope
Element 3
Scope: FirDefaultSimpleImportingScope
Element 4
Scope: FirPackageMemberScope
Element 5
Scope: FirExplicitSimpleImportingScope
Element 6
Implicit receiver:
FirRegularClassSymbol public final companion object Companion : R|test/MyInterface|
Type: test.MyClass.Companion
Element 7
Scope: FirNestedClassifierScopeImpl
Classifiers:
FirRegularClassSymbol public final companion object Companion : R|test/MyInterface|
Element 8
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] superTypeDelegatedToCompanion.kt
public abstract [ResolvedTo(STATUS)] interface MyInterface : R|kotlin/Any| {
}
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class MyClass : R|test/MyInterface| {
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/MyClass| {
super<R|kotlin/Any|>()
}
private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|test/MyInterface| = Q|test/MyClass.Companion|
public final companion [ResolvedTo(STATUS)] object Companion : R|test/MyInterface| {
private [ResolvedTo(STATUS)] constructor(): R|test/MyClass.Companion| {
LAZY_super<<implicit>>
}
}
}
@@ -0,0 +1,29 @@
Tower Data Context:
Element 0
Scope: FirDefaultStarImportingScope
Element 1
Scope: FirExplicitStarImportingScope
Element 2
Scope: FirDefaultSimpleImportingScope
Element 3
Scope: FirDefaultSimpleImportingScope
Element 4
Scope: FirPackageMemberScope
Element 5
Scope: FirExplicitSimpleImportingScope
Element 6
Scope: FirLocalScope
Properties:
FirValueParameterSymbol param: R|test/MyInterface|
FILE: [ResolvedTo(IMPORTS)] superTypeDelegatedToPrimaryConstructorParam.kt
public final? [ResolvedTo(RAW_FIR)] interface MyInterface : R|kotlin/Any| {
}
public final [ResolvedTo(STATUS)] class MyClass : R|test/MyInterface| {
public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] param: R|test/MyInterface|): R|test/MyClass| {
super<R|kotlin/Any|>()
}
private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|test/MyInterface| = R|<local>/param|
}
@@ -0,0 +1,5 @@
package test
interface MyInterface
class MyClass(param: MyInterface): MyInterface by <expr>param</expr>
@@ -0,0 +1,29 @@
Tower Data Context:
Element 0
Scope: FirDefaultStarImportingScope
Element 1
Scope: FirExplicitStarImportingScope
Element 2
Scope: FirDefaultSimpleImportingScope
Element 3
Scope: FirDefaultSimpleImportingScope
Element 4
Scope: FirPackageMemberScope
Element 5
Scope: FirExplicitSimpleImportingScope
Element 6
Scope: FirLocalScope
Properties:
FirValueParameterSymbol param: R|test/MyInterface|
FILE: [ResolvedTo(IMPORTS)] superTypeDelegatedToPrimaryConstructorParam.kt
public abstract [ResolvedTo(STATUS)] interface MyInterface : R|kotlin/Any| {
}
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class MyClass : R|test/MyInterface| {
public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] param: R|test/MyInterface|): R|test/MyClass| {
super<R|kotlin/Any|>()
}
private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|test/MyInterface| = R|<local>/param|
}