diff --git a/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/contextReceiver.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/contextReceiver.copy.txt new file mode 100644 index 00000000000..210f3fa2ad5 --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/contextReceiver.copy.txt @@ -0,0 +1,35 @@ +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 + +FILE: [ResolvedTo(IMPORTS)] contextReceiver.kt + public open [ResolvedTo(RAW_FIR)] class Base : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base| { + LAZY_super + } + + public final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| { + LAZY_super + } + + } + + } + context(R|test/Base|) + public final [ResolvedTo(STATUS)] class Child : R|test/Base| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Child| { + super() + } + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/primaryConstructorParameter_initializerExpression.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/primaryConstructorParameter_initializerExpression.copy.txt new file mode 100644 index 00000000000..6a3a62e489e --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/primaryConstructorParameter_initializerExpression.copy.txt @@ -0,0 +1,46 @@ +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: FirNestedClassifierScopeWithSubstitution + Classifiers: + FirRegularClassSymbol public final? class Nested : R|kotlin/Any| + Static scope owner symbol: FirRegularClassSymbol public open class Base : R|kotlin/Any| + Element 7 + Scope: FirLocalScope + Properties: + FirValueParameterSymbol name: R|kotlin/String| = String(name) + +FILE: [ResolvedTo(IMPORTS)] primaryConstructorParameter_initializerExpression.kt + public open [ResolvedTo(RAW_FIR)] class Base : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base| { + LAZY_super + } + + public final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| { + LAZY_super + } + + } + + public? final? [ResolvedTo(RAW_FIR)] val fromBase: String = LAZY_EXPRESSION + public? [ResolvedTo(RAW_FIR)] get(): String + + } + public final? [ResolvedTo(RAW_FIR)] class Child : Base { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] name: R|kotlin/String| = String(name)): R|test/Child| { + super() + } + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/primaryConstructorParameter_typeRef.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/primaryConstructorParameter_typeRef.copy.txt new file mode 100644 index 00000000000..9e9893fd33f --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/primaryConstructorParameter_typeRef.copy.txt @@ -0,0 +1,43 @@ +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: FirNestedClassifierScopeWithSubstitution + Classifiers: + FirRegularClassSymbol public final? class Nested : R|kotlin/Any| + Static scope owner symbol: FirRegularClassSymbol public open class Base : R|kotlin/Any| + Element 7 + Scope: FirLocalScope + Properties: + FirValueParameterSymbol name: R|kotlin/String| + +FILE: [ResolvedTo(IMPORTS)] primaryConstructorParameter_typeRef.kt + public open [ResolvedTo(RAW_FIR)] class Base : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base| { + LAZY_super + } + + public final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| { + LAZY_super + } + + } + + } + public final? [ResolvedTo(RAW_FIR)] class Child : Base { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] name: R|kotlin/String|): R|test/Child| { + super() + } + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCallArgumentsExpression.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCallArgumentsExpression.copy.txt new file mode 100644 index 00000000000..2a2399acc2f --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCallArgumentsExpression.copy.txt @@ -0,0 +1,43 @@ +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: FirNestedClassifierScopeWithSubstitution + Classifiers: + FirRegularClassSymbol public final class Nested : R|kotlin/Any| + Static scope owner symbol: FirRegularClassSymbol public open class Base : R|kotlin/Any| + Element 7 + Scope: FirLocalScope + Properties: + FirValueParameterSymbol primaryConstructorParameter: R|test/Base.Nested| + +FILE: [ResolvedTo(IMPORTS)] superTypeCallArgumentsExpression.kt + public open [ResolvedTo(RAW_FIR)] class Base : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor([ResolvedTo(RAW_FIR)] param: Nested): R|test/Base| { + LAZY_super + } + + public final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| { + LAZY_super + } + + } + + } + public final [ResolvedTo(STATUS)] class Child : R|test/Base| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] primaryConstructorParameter: R|test/Base.Nested|): R|test/Child| { + super(R|/primaryConstructorParameter|) + } + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCallArgumentsExpression_objectLiteral.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCallArgumentsExpression_objectLiteral.copy.txt new file mode 100644 index 00000000000..bf29baf7fe9 --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCallArgumentsExpression_objectLiteral.copy.txt @@ -0,0 +1,43 @@ +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: FirNestedClassifierScopeWithSubstitution + Classifiers: + FirRegularClassSymbol public final class Nested : R|kotlin/Any| + Static scope owner symbol: FirRegularClassSymbol public open class Base : R|kotlin/Any| + +FILE: [ResolvedTo(IMPORTS)] superTypeCallArgumentsExpression_objectLiteral.kt + public open [ResolvedTo(RAW_FIR)] class Base : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor([ResolvedTo(RAW_FIR)] param: Nested): R|test/Base| { + LAZY_super + } + + public final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| { + LAZY_super + } + + } + + } + public? final? [ResolvedTo(RAW_FIR)] val property: Base.Nested = LAZY_EXPRESSION + public? [ResolvedTo(RAW_FIR)] get(): Base.Nested + public final [ResolvedTo(BODY_RESOLVE)] val child: R|test/Base| = object : R|test/Base| { + private [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/| { + super(R|test/property|) + } + + } + + public [ResolvedTo(BODY_RESOLVE)] get(): R|test/Base| \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCallArgumentsTypeRef.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCallArgumentsTypeRef.copy.txt new file mode 100644 index 00000000000..e6cc7ffaa68 --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCallArgumentsTypeRef.copy.txt @@ -0,0 +1,44 @@ +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: FirNestedClassifierScopeWithSubstitution + Classifiers: + FirRegularClassSymbol public final class Nested : R|kotlin/Any| + Static scope owner symbol: FirRegularClassSymbol public open class Base : R|kotlin/Any| + Element 7 + Scope: FirLocalScope + Properties: + FirValueParameterSymbol primaryConstructorParameter: R|test/Base.Nested| + +FILE: [ResolvedTo(IMPORTS)] superTypeCallArgumentsTypeRef.kt + public open [ResolvedTo(RAW_FIR)] class Base : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor([ResolvedTo(RAW_FIR)] param: Nested): R|test/Base| { + LAZY_super + } + + public final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| { + LAZY_super + } + + } + + } + public? final? [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] T> materialize(): T { LAZY_BLOCK } + public final [ResolvedTo(STATUS)] class Child : R|test/Base| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] primaryConstructorParameter: R|test/Base.Nested|): R|test/Child| { + super(R|test/materialize|()) + } + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCallee.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCallee.copy.txt new file mode 100644 index 00000000000..0b8a7fbaba9 --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCallee.copy.txt @@ -0,0 +1,34 @@ +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 + +FILE: [ResolvedTo(IMPORTS)] superTypeCallee.kt + public open [ResolvedTo(RAW_FIR)] class Base : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base| { + LAZY_super + } + + public final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| { + LAZY_super + } + + } + + } + public final [ResolvedTo(STATUS)] class Child : R|test/Base| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Child| { + super() + } + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCalleeGenerics.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCalleeGenerics.copy.txt new file mode 100644 index 00000000000..1d57b6e9cab --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCalleeGenerics.copy.txt @@ -0,0 +1,34 @@ +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 + +FILE: [ResolvedTo(IMPORTS)] superTypeCalleeGenerics.kt + public open [ResolvedTo(RAW_FIR)] class Base<[ResolvedTo(RAW_FIR)] T> : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor<[ResolvedTo(RAW_FIR)] T>(): R|test/Base| { + LAZY_super + } + + public final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| { + LAZY_super + } + + } + + } + public final [ResolvedTo(STATUS)] class Child : R|test/Base| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Child| { + super|>() + } + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCallee_objectLiteral.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCallee_objectLiteral.copy.txt new file mode 100644 index 00000000000..773c9db4b1b --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeCallee_objectLiteral.copy.txt @@ -0,0 +1,36 @@ +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 + +FILE: [ResolvedTo(IMPORTS)] superTypeCallee_objectLiteral.kt + public open [ResolvedTo(RAW_FIR)] class Base : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base| { + LAZY_super + } + + public final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| { + LAZY_super + } + + } + + } + public final [ResolvedTo(BODY_RESOLVE)] val child: R|test/Base| = object : R|test/Base| { + private [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/| { + super() + } + + } + + public [ResolvedTo(BODY_RESOLVE)] get(): R|test/Base| \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeDelegatedExpression.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeDelegatedExpression.copy.txt new file mode 100644 index 00000000000..93dae10a0ea --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeDelegatedExpression.copy.txt @@ -0,0 +1,47 @@ +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: FirNestedClassifierScopeWithSubstitution + Classifiers: + FirRegularClassSymbol public final class Nested : R|test/MyInterface| + Static scope owner symbol: FirRegularClassSymbol public open class Base : R|kotlin/Any| + Element 7 + Scope: FirLocalScope + Properties: + FirValueParameterSymbol constructorParam: R|test/MyInterface| + +FILE: [ResolvedTo(IMPORTS)] superTypeDelegatedExpression.kt + public final? [ResolvedTo(RAW_FIR)] interface MyInterface : R|kotlin/Any| { + } + public open [ResolvedTo(RAW_FIR)] class Base : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base| { + LAZY_super + } + + public final? [ResolvedTo(RAW_FIR)] class Nested : MyInterface { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| { + LAZY_super<> + } + + } + + } + public final [ResolvedTo(STATUS)] class Child : R|test/Base|, R|test/MyInterface| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] constructorParam: R|test/MyInterface|): R|test/Child| { + super() + } + + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|test/MyInterface| = R|test/Base.Nested.Nested|() + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeDelegatedTypeRef.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeDelegatedTypeRef.copy.txt new file mode 100644 index 00000000000..e3485731c90 --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeDelegatedTypeRef.copy.txt @@ -0,0 +1,38 @@ +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 + +FILE: [ResolvedTo(IMPORTS)] superTypeDelegatedTypeRef.kt + public final? [ResolvedTo(RAW_FIR)] interface MyInterface : R|kotlin/Any| { + } + public open [ResolvedTo(RAW_FIR)] class Base : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base| { + LAZY_super + } + + public final? [ResolvedTo(RAW_FIR)] class Nested : MyInterface { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| { + LAZY_super<> + } + + } + + } + public final [ResolvedTo(STATUS)] class Child : R|test/Base|, R|test/MyInterface| { + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|test/MyInterface| = R|test/Base.Nested.Nested|() + + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Child| { + super() + } + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeRef.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeRef.copy.txt new file mode 100644 index 00000000000..029b46cf32a --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeRef.copy.txt @@ -0,0 +1,34 @@ +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 + +FILE: [ResolvedTo(IMPORTS)] superTypeRef.kt + public open [ResolvedTo(RAW_FIR)] class Base : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base| { + LAZY_super + } + + public final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| { + LAZY_super + } + + } + + } + public final [ResolvedTo(STATUS)] class Child : R|test/Base| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Child| { + super() + } + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeRefGenerics.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeRefGenerics.copy.txt new file mode 100644 index 00000000000..8b9c329f7db --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/classHeaderPositions/superTypeRefGenerics.copy.txt @@ -0,0 +1,34 @@ +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 + +FILE: [ResolvedTo(IMPORTS)] superTypeRefGenerics.kt + public open [ResolvedTo(RAW_FIR)] class Base<[ResolvedTo(RAW_FIR)] T> : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor<[ResolvedTo(RAW_FIR)] T>(): R|test/Base| { + LAZY_super + } + + public final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| { + LAZY_super + } + + } + + } + public final [ResolvedTo(STATUS)] class Child : R|test/Base| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Child| { + super|>() + } + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/contextReceivers.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/contextReceivers.copy.txt new file mode 100644 index 00000000000..3b846db1884 --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/contextReceivers.copy.txt @@ -0,0 +1,41 @@ +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 + Element 7 + Context receivers: + FirNamedFunctionSymbol context(R|Foo|, R|Bar|) + public final fun test(): R|kotlin/Unit| + Type: Foo + Label: Foo + FirNamedFunctionSymbol context(R|Foo|, R|Bar|) + public final fun test(): R|kotlin/Unit| + Type: Bar + Label: Bar + Element 8 + Scope: FirLocalScope + +FILE: [ResolvedTo(IMPORTS)] contextReceivers.kt + public final? [ResolvedTo(RAW_FIR)] interface Foo : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] fun foo(): Int + + } + public final? [ResolvedTo(RAW_FIR)] interface Bar : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] fun bar(): Int + + } + context(R|Foo|, R|Bar|) + public final [ResolvedTo(BODY_RESOLVE)] fun test(): R|kotlin/Unit| { + this@R|/test|.R|/Foo.foo|().R|kotlin/Int.plus|(this@R|/test|.R|/Bar.bar|()) + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/contextReceiversClass.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/contextReceiversClass.copy.txt new file mode 100644 index 00000000000..f5f8088c8bf --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/contextReceiversClass.copy.txt @@ -0,0 +1,45 @@ +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 context(R|Foo|) + public final class Test : R|kotlin/Any| + Type: Test + Element 7 + Context receivers: + FirRegularClassSymbol context(R|Foo|) + public final class Test : R|kotlin/Any| + Type: Foo + Label: Foo + Element 8 + Scope: FirLocalScope + Element 9 + Scope: FirLocalScope + +FILE: [ResolvedTo(IMPORTS)] contextReceiversClass.kt + public final? [ResolvedTo(RAW_FIR)] interface Foo : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] fun foo(): Int + + } + context(Foo) + public final? [ResolvedTo(RAW_FIR)] class Test : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|Test| { + LAZY_super + } + + public final [ResolvedTo(BODY_RESOLVE)] fun test(): R|kotlin/Unit| { + this@R|/Test|.R|/Foo.foo|() + } + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/enumValue.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/enumValue.copy.txt new file mode 100644 index 00000000000..03117c1cb4b --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/enumValue.copy.txt @@ -0,0 +1,79 @@ +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|kotlin/Any| + Type: kotlin.Enum.Companion + Element 7 + Scope: FirNestedClassifierScopeWithSubstitution + Classifiers: + FirRegularClassSymbol public final companion object Companion : R|kotlin/Any| + Static scope owner symbol: FirRegularClassSymbol public abstract class Enum|> : R|kotlin/Comparable|, R|java/io/Serializable| + Element 8 + Scope: FirNameAwareOnlyCallablesScope + Functions + FirNamedFunctionSymbol public final static fun valueOf(value: R|kotlin/String|): R|Direction| + FirNamedFunctionSymbol public final static fun values(): R|kotlin/Array| + Properties: + FirEnumEntrySymbol public final static enum entry EAST: R|Direction| = object : R|Direction| + FirEnumEntrySymbol public final static enum entry NORTH: R|Direction| = LAZY_EXPRESSION + FirEnumEntrySymbol public final static enum entry SOUTH: R|Direction| = LAZY_EXPRESSION + FirEnumEntrySymbol public final static enum entry WEST: R|Direction| = LAZY_EXPRESSION + FirPropertySymbol public final static val entries: R|kotlin/enums/EnumEntries| + public get(): R|kotlin/enums/EnumEntries| + Element 9 + Implicit receiver: + FirAnonymousObjectSymbol object : R|Direction| + Type: + Element 10 + Scope: FirLocalScope + Properties: + FirBackingFieldSymbol private : R|kotlin/Int| + Element 11 + Scope: FirLocalScope + +FILE: [ResolvedTo(IMPORTS)] enumValue.kt + public final? [ResolvedTo(RAW_FIR)] enum class Direction : R|kotlin/Enum| { + private [ResolvedTo(RAW_FIR)] constructor(): R|Direction| { + LAZY_super|> + } + + public final static [ResolvedTo(RAW_FIR)] enum entry NORTH: R|Direction| = LAZY_EXPRESSION + public final static [ResolvedTo(BODY_RESOLVE)] enum entry EAST: R|Direction| = object : R|Direction| { + private [ResolvedTo(BODY_RESOLVE)] constructor(): R|| { + super() + } + + public open override [ResolvedTo(BODY_RESOLVE)] val code: R|kotlin/Int| + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { + ^ Int(2) + } + + } + + public final static [ResolvedTo(RAW_FIR)] enum entry SOUTH: R|Direction| = LAZY_EXPRESSION + public final static [ResolvedTo(RAW_FIR)] enum entry WEST: R|Direction| = LAZY_EXPRESSION + public? abstract [ResolvedTo(RAW_FIR)] val code: Int + public? [ResolvedTo(RAW_FIR)] get(): Int + + public final static [ResolvedTo(RAW_FIR)] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(RAW_FIR)] fun valueOf([ResolvedTo(RAW_FIR)] value: R|kotlin/String|): R|Direction| { + } + + public final static [ResolvedTo(RAW_FIR)] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(RAW_FIR)] get(): R|kotlin/enums/EnumEntries| + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/extensionFunction.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/extensionFunction.copy.txt new file mode 100644 index 00000000000..5f0a0c9980e --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/extensionFunction.copy.txt @@ -0,0 +1,27 @@ +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 + Element 7 + Implicit receiver: + FirNamedFunctionSymbol public final fun R|kotlin/String|.test(): R|kotlin/Unit| + Type: kotlin.String + Element 8 + Scope: FirLocalScope + +FILE: [ResolvedTo(IMPORTS)] extensionFunction.kt + public final [ResolvedTo(BODY_RESOLVE)] fun R|kotlin/String|.test(): R|kotlin/Unit| { + R|/consume|(this@R|/test|) + } + public? final? [ResolvedTo(RAW_FIR)] fun consume([ResolvedTo(RAW_FIR)] obj: Any): R|kotlin/Unit| { LAZY_BLOCK } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/extensionLambdas.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/extensionLambdas.copy.txt new file mode 100644 index 00000000000..0308c2d7a5b --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/extensionLambdas.copy.txt @@ -0,0 +1,46 @@ +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 + Element 7 + Scope: FirLocalScope + Element 8 + Scope: FirLocalScope + Element 9 + Implicit receiver: + FirAnonymousFunctionSymbol foo@fun R|kotlin/String|.(): R|kotlin/Unit| + Type: kotlin.String + Element 10 + Scope: FirLocalScope + Element 11 + Scope: FirLocalScope + Element 12 + Implicit receiver: + FirAnonymousFunctionSymbol num@fun R|kotlin/Int|.(): R|kotlin/Unit| + Type: kotlin.Int + Element 13 + Scope: FirLocalScope + +FILE: [ResolvedTo(IMPORTS)] extensionLambdas.kt + public final [ResolvedTo(BODY_RESOLVE)] fun test(): R|kotlin/Unit| { + R|/block|(String(foo), = [ResolvedTo(BODY_RESOLVE)] foo@fun R|kotlin/String|.(): R|kotlin/Unit| { + R|/block|(Int(42), = [ResolvedTo(BODY_RESOLVE)] num@fun R|kotlin/Int|.(): R|kotlin/Unit| { + R|/consume|(this@R|special/anonymous|.R|kotlin/String.length|.R|kotlin/Int.plus|(this@R|special/anonymous|)) + } + ) + } + ) + } + public? final? [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] T> block([ResolvedTo(RAW_FIR)] reciever: T, [ResolvedTo(RAW_FIR)] block: ( T.() -> Unit )): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [ResolvedTo(RAW_FIR)] fun consume([ResolvedTo(RAW_FIR)] num: Int): R|kotlin/Unit| { LAZY_BLOCK } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/file.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/file.copy.txt new file mode 100644 index 00000000000..33a4aa4b872 --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/file.copy.txt @@ -0,0 +1,34 @@ +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 + Import name:List + Qualified name: java.util.List + Is all under: false + +FILE: [ResolvedTo(IMPORTS)] file.kt + public final [ResolvedTo(BODY_RESOLVE)] fun test(): R|kotlin/reflect/KClass>| { + ^test (Q|java/util/List|) + } + public final [ResolvedTo(BODY_RESOLVE)] fun other(): R|kotlin/Int| { + ^other String(foo).R|kotlin/String.length| + } + public final [ResolvedTo(STATUS)] class Foo : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Foo| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| { + #(==(R|test/other|(), Int(3))) + } + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/innerClasses.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/innerClasses.copy.txt new file mode 100644 index 00000000000..af50e580c61 --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/innerClasses.copy.txt @@ -0,0 +1,60 @@ +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: FirNestedClassifierScopeImpl + Classifiers: + FirRegularClassSymbol public final inner class Bar : R|kotlin/Any| + Element 7 + Scope: FirMemberTypeParameterScope + Classifiers: + FirTypeParameterSymbol F + Element 8 + Implicit receiver: + FirRegularClassSymbol public final class Foo : R|kotlin/Any| + Type: test.Foo + Element 9 + Scope: FirMemberTypeParameterScope + Classifiers: + FirTypeParameterSymbol B + Element 10 + Implicit receiver: + FirRegularClassSymbol public final inner class Bar : R|kotlin/Any| + Type: test.Foo.Bar + Element 11 + Scope: FirLocalScope + Properties: + FirValueParameterSymbol b: R|B| + FirValueParameterSymbol f: R|F| + Element 12 + Scope: FirLocalScope + +FILE: [ResolvedTo(IMPORTS)] innerClasses.kt + public final? [ResolvedTo(RAW_FIR)] class Foo<[ResolvedTo(RAW_FIR)] F> : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor<[ResolvedTo(RAW_FIR)] F>(): R|test/Foo| { + LAZY_super + } + + public final? inner [ResolvedTo(RAW_FIR)] class Bar<[ResolvedTo(RAW_FIR)] B, [ResolvedTo(RAW_FIR)] Outer(F)> : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] test/Foo.constructor<[ResolvedTo(RAW_FIR)] B>(): R|test/Foo.Bar| { + LAZY_super + } + + public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] f: R|F|, [ResolvedTo(BODY_RESOLVE)] b: R|B|): R|kotlin/Unit| { + R|test/consume#|(R|/f|) + } + + } + + } + public? final? [ResolvedTo(RAW_FIR)] fun consume([ResolvedTo(RAW_FIR)] obj: Any): R|kotlin/Unit| { LAZY_BLOCK } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/lambdaArguments.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/lambdaArguments.copy.txt new file mode 100644 index 00000000000..9f4a0676c31 --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/lambdaArguments.copy.txt @@ -0,0 +1,41 @@ +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 + Element 7 + Scope: FirLocalScope + Element 8 + Scope: FirLocalScope + Properties: + FirValueParameterSymbol s: R|kotlin/String| + Element 9 + Scope: FirLocalScope + Element 10 + Scope: FirLocalScope + Properties: + FirValueParameterSymbol n: R|kotlin/Int| + Element 11 + Scope: FirLocalScope + +FILE: [ResolvedTo(IMPORTS)] lambdaArguments.kt + public final [ResolvedTo(BODY_RESOLVE)] fun test(): R|kotlin/Unit| { + R|/block|(String(foo), = [ResolvedTo(BODY_RESOLVE)] block@fun ([ResolvedTo(BODY_RESOLVE)] s: R|kotlin/String|): R|kotlin/Unit| { + R|/block|(Int(42), = [ResolvedTo(BODY_RESOLVE)] block@fun ([ResolvedTo(BODY_RESOLVE)] n: R|kotlin/Int|): R|kotlin/Unit| { + R|/s|.R|kotlin/String.length|.R|kotlin/Int.plus|(R|/n|) + } + ) + } + ) + } + public? final? [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] T> block([ResolvedTo(RAW_FIR)] obj: T, [ResolvedTo(RAW_FIR)] block: ( (T) -> Unit )): R|kotlin/Unit| { LAZY_BLOCK } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/nestedClasses.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/nestedClasses.copy.txt new file mode 100644 index 00000000000..484143306c1 --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/nestedClasses.copy.txt @@ -0,0 +1,51 @@ +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: FirNestedClassifierScopeImpl + Classifiers: + FirRegularClassSymbol public final class Bar : R|kotlin/Any| + Element 7 + Scope: FirMemberTypeParameterScope + Classifiers: + FirTypeParameterSymbol B + Element 8 + Implicit receiver: + FirRegularClassSymbol public final class Bar : R|kotlin/Any| + Type: test.Foo.Bar + Element 9 + Scope: FirLocalScope + Properties: + FirValueParameterSymbol b: R|B| + Element 10 + Scope: FirLocalScope + +FILE: [ResolvedTo(IMPORTS)] nestedClasses.kt + public final? [ResolvedTo(RAW_FIR)] class Foo<[ResolvedTo(RAW_FIR)] F> : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor<[ResolvedTo(RAW_FIR)] F>(): R|test/Foo| { + LAZY_super + } + + public final? [ResolvedTo(RAW_FIR)] class Bar<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor<[ResolvedTo(RAW_FIR)] B>(): R|test/Foo.Bar| { + LAZY_super + } + + public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] b: R|B|): R|kotlin/Unit| { + R|test/consume#|(R|/b|) + } + + } + + } + public? final? [ResolvedTo(RAW_FIR)] fun consume([ResolvedTo(RAW_FIR)] obj: Any): R|kotlin/Unit| { LAZY_BLOCK } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/parameter.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/parameter.copy.txt new file mode 100644 index 00000000000..e2b79999635 --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/parameter.copy.txt @@ -0,0 +1,34 @@ +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 class Foo : R|kotlin/Any| + Type: Foo + Element 7 + Scope: FirLocalScope + Properties: + FirValueParameterSymbol abc: R|kotlin/Int| + +FILE: [ResolvedTo(IMPORTS)] parameter.kt + public final? [ResolvedTo(RAW_FIR)] class Foo : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|Foo| { + LAZY_super + } + + public final [ResolvedTo(BODY_RESOLVE)] fun foo([ResolvedTo(BODY_RESOLVE)] abc: R|kotlin/Int|): R|kotlin/Unit| { + } + + public? final? [ResolvedTo(RAW_FIR)] fun other(): R|kotlin/Unit| { LAZY_BLOCK } + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/primaryConstructor.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/primaryConstructor.copy.txt new file mode 100644 index 00000000000..b940d074a2b --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/primaryConstructor.copy.txt @@ -0,0 +1,31 @@ +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 class Foo : R|kotlin/Any| + Type: Foo + +FILE: [ResolvedTo(IMPORTS)] primaryConstructor.kt + public final? [ResolvedTo(RAW_FIR)] class Foo : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] a: R|kotlin/String| = String(foo), [ResolvedTo(BODY_RESOLVE)] b: R|kotlin/Int| = R|/a|.R|kotlin/String.length|): R|Foo| { + super() + } + + public? final? [ResolvedTo(RAW_FIR)] val a: String = R|/a| + public? [ResolvedTo(RAW_FIR)] get(): String + + public? final? [ResolvedTo(RAW_FIR)] val b: Int = R|/b| + public? [ResolvedTo(RAW_FIR)] get(): Int + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/primaryConstructorParameter.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/primaryConstructorParameter.copy.txt new file mode 100644 index 00000000000..b3e62a73cad --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/primaryConstructorParameter.copy.txt @@ -0,0 +1,27 @@ +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 a: R|kotlin/String| = String(foo) + FirValueParameterSymbol b: R|kotlin/Int| = R|/a|.R|kotlin/String.length| + FirValueParameterSymbol c: R|kotlin/Long| = R|/a|.R|kotlin/String.length|.R|kotlin/Int.minus|(Int(1)).R|kotlin/Int.toLong|() + +FILE: [ResolvedTo(IMPORTS)] primaryConstructorParameter.kt + public final? [ResolvedTo(RAW_FIR)] class Foo : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] a: R|kotlin/String| = String(foo), [ResolvedTo(BODY_RESOLVE)] b: R|kotlin/Int| = R|/a|.R|kotlin/String.length|, [ResolvedTo(BODY_RESOLVE)] c: R|kotlin/Long| = R|/a|.R|kotlin/String.length|.R|kotlin/Int.minus|(Int(1)).R|kotlin/Int.toLong|()): R|Foo| { + super() + } + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/primaryConstructorProperty.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/primaryConstructorProperty.copy.txt new file mode 100644 index 00000000000..675935fe409 --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/primaryConstructorProperty.copy.txt @@ -0,0 +1,34 @@ +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 class Foo : R|kotlin/Any| + Type: Foo + +FILE: [ResolvedTo(IMPORTS)] primaryConstructorProperty.kt + public final? [ResolvedTo(RAW_FIR)] class Foo : R|kotlin/Any| { + public [ResolvedTo(ANNOTATION_ARGUMENTS)] constructor([ResolvedTo(ANNOTATION_ARGUMENTS)] a: R|kotlin/String| = LAZY_EXPRESSION, [ResolvedTo(ANNOTATION_ARGUMENTS)] b: R|kotlin/Int| = LAZY_EXPRESSION, [ResolvedTo(ANNOTATION_ARGUMENTS)] c: R|kotlin/Long| = LAZY_EXPRESSION): R|Foo| { + LAZY_super + } + + public? final? [ResolvedTo(RAW_FIR)] val a: String = R|/a| + public? [ResolvedTo(RAW_FIR)] get(): String + + public final [ResolvedTo(BODY_RESOLVE)] val b: R|kotlin/Int| = R|/b| + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| + + public? final? [ResolvedTo(RAW_FIR)] val c: Long = R|/c| + public? [ResolvedTo(RAW_FIR)] get(): Long + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/propertyAccessor.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/propertyAccessor.copy.txt new file mode 100644 index 00000000000..7705c8994ec --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/propertyAccessor.copy.txt @@ -0,0 +1,34 @@ +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 class Foo : R|kotlin/Any| + Type: Foo + Element 7 + Scope: FirLocalScope + Properties: + FirBackingFieldSymbol private : R|kotlin/Int| + +FILE: [ResolvedTo(IMPORTS)] propertyAccessor.kt + public final? [ResolvedTo(RAW_FIR)] class Foo : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor(): R|Foo| { + LAZY_super + } + + public final [ResolvedTo(BODY_RESOLVE)] val x: R|kotlin/Int| + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { + ^ Int(42) + } + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/propertyDelegateInitializer.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/propertyDelegateInitializer.copy.txt new file mode 100644 index 00000000000..230bb444ca5 --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/propertyDelegateInitializer.copy.txt @@ -0,0 +1,41 @@ +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 class Foo : R|kotlin/Any| + Type: test.Foo + Element 7 + Scope: FirLocalScope + Properties: + FirValueParameterSymbol constructorParam: R|test/MyInterface| + +FILE: [ResolvedTo(IMPORTS)] propertyDelegateInitializer.kt + public final? [ResolvedTo(RAW_FIR)] interface MyInterface : R|kotlin/Any| { + public? final? operator [ResolvedTo(RAW_FIR)] fun getValue([ResolvedTo(RAW_FIR)] thisRef: Any, [ResolvedTo(RAW_FIR)] property: Any): MyInterface + + } + public final? [ResolvedTo(RAW_FIR)] class Foo : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] constructor([ResolvedTo(RAW_FIR)] constructorParam: MyInterface): R|test/Foo| { + LAZY_super + } + + public? final? [ResolvedTo(RAW_FIR)] val regularProperty: MyInterface + public? [ResolvedTo(RAW_FIR)] get(): MyInterface + + public final [ResolvedTo(BODY_RESOLVE)] val property: R|test/MyInterface|by R|/constructorParam| + public [ResolvedTo(BODY_RESOLVE)] get(): R|test/MyInterface| { + ^ this@R|test/Foo|.D|test/Foo.property|.R|test/MyInterface.getValue|(this@R|test/Foo|, ::R|test/Foo.property|) + } + + } \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/contextCollector/scripts/insideClassMember.copy.txt b/analysis/low-level-api-fir/testData/contextCollector/scripts/insideClassMember.copy.txt new file mode 100644 index 00000000000..078ea18a223 --- /dev/null +++ b/analysis/low-level-api-fir/testData/contextCollector/scripts/insideClassMember.copy.txt @@ -0,0 +1,103 @@ +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: FirScriptDeclarationsScope + Classifiers: + FirRegularClassSymbol public final? class After_OtherClass : R|kotlin/Any| + FirRegularClassSymbol public final? class Before_OtherClass : R|kotlin/Any| + FirRegularClassSymbol public final? class MyClass : R|kotlin/Any| + Functions + FirNamedFunctionSymbol public? final? fun after_Fun(): R|kotlin/Unit| + FirNamedFunctionSymbol public? final? fun before_Fun(): R|kotlin/Unit| + Properties: + FirPropertySymbol public? final? val after_Val: + public? get(): + FirPropertySymbol public? final? val before_Val: + public? get(): + Element 7 + Scope: FirLocalScope + Classifiers: + FirRegularClassSymbol public final class MyClass : R|kotlin/Any| + Properties: + FirPropertySymbol lval args: R|kotlin/Array| + Element 8 + Context receivers: + FirScriptSymbol context(