[LL FIR] rename testdata to testData to avoid copyright generation

We exclude testData pattern from copyright scope
This commit is contained in:
Dmitrii Gridin
2023-09-18 19:33:14 +02:00
committed by Space Team
parent aef5290210
commit 33e6a85a2d
1953 changed files with 2000 additions and 2000 deletions
@@ -0,0 +1,5 @@
fun foo(param: String?): String? {
val tmp = param?.let {
<expr>it</expr>
} ?: return null
}
@@ -0,0 +1,35 @@
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: FirLocalScope
Properties:
FirValueParameterSymbol param: R|kotlin/String?|
Element 8
Scope: FirLocalScope
Element 9
Scope: FirLocalScope
Properties:
FirValueParameterSymbol it: R|kotlin/String|
Element 10
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] KT-61728.kt
public final [ResolvedTo(BODY_RESOLVE)] fun foo([ResolvedTo(BODY_RESOLVE)] param: R|kotlin/String?|): R|kotlin/String?| {
[ResolvedTo(BODY_RESOLVE)] lval tmp: R|kotlin/String| = R|<local>/param|?.{ $subj$.R|kotlin/let|<R|kotlin/String|, R|kotlin/String|>(<L> = [ResolvedTo(BODY_RESOLVE)] let@fun <anonymous>([ResolvedTo(BODY_RESOLVE)] it: R|kotlin/String|): R|kotlin/String| <inline=Inline, kind=EXACTLY_ONCE> {
^ R|<local>/it|
}
) } ?: ^foo Null(null)
}
@@ -0,0 +1,8 @@
package test
open class Base {
class Nested
}
context(<expr>Base</expr>)
class Child : Base() {}
@@ -0,0 +1,37 @@
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
FILE: [ResolvedTo(IMPORTS)] contextReceiver.kt
public open [ResolvedTo(STATUS)] class Base : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor(): R|test/Base| {
LAZY_super<R|kotlin/Any|>
}
public? final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| {
LAZY_super<R|kotlin/Any|>
}
}
}
context(R|test/Base|)
public final [ResolvedTo(STATUS)] class Child : R|test/Base| {
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Child| {
super<R|test/Base|>()
}
}
@@ -0,0 +1,9 @@
package test
open class Base {
class Nested
val fromBase: String = ""
}
class Child(name: String = <expr>"name"</expr>) : Base()
@@ -0,0 +1,48 @@
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: FirNestedClassifierScopeWithSubstitution
Classifiers:
FirRegularClassSymbol public final class Nested : R|kotlin/Any|
Static scope owner symbol: FirRegularClassSymbol public open class Base : R|kotlin/Any|
Element 8
Scope: FirLocalScope
Properties:
FirValueParameterSymbol name: R|kotlin/String| = String(name)
FILE: [ResolvedTo(IMPORTS)] primaryConstructorParameter_initializerExpression.kt
public open [ResolvedTo(STATUS)] class Base : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Base| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] class Nested : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Base.Nested| {
super<R|kotlin/Any|>()
}
}
public final [ResolvedTo(BODY_RESOLVE)] val fromBase: R|kotlin/String| = String()
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String|
}
public final [ResolvedTo(STATUS)] class Child : R|test/Base| {
public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] name: R|kotlin/String| = String(name)): R|test/Child| {
super<R|test/Base|>()
}
}
@@ -0,0 +1,7 @@
package test
open class Base {
class Nested
}
class Child(name: <expr>String</expr>) : Base()
@@ -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: FirNestedClassifierScopeWithSubstitution
Classifiers:
FirRegularClassSymbol public final class Nested : R|kotlin/Any|
Static scope owner symbol: FirRegularClassSymbol public open class Base : R|kotlin/Any|
Element 8
Scope: FirLocalScope
Properties:
FirValueParameterSymbol name: R|kotlin/String|
FILE: [ResolvedTo(IMPORTS)] primaryConstructorParameter_typeRef.kt
public open [ResolvedTo(STATUS)] class Base : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Base| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] class Nested : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Base.Nested| {
super<R|kotlin/Any|>()
}
}
}
public final [ResolvedTo(STATUS)] class Child : R|test/Base| {
public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] name: R|kotlin/String|): R|test/Child| {
super<R|test/Base|>()
}
}
@@ -0,0 +1,12 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package test
open class Base(param: Nested) {
class Nested
}
class Child(primaryConstructorParameter: Nested) : Base(<expr>primaryConstructorParameter</expr>)
@@ -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: FirNestedClassifierScopeWithSubstitution
Classifiers:
FirRegularClassSymbol public final class Nested : R|kotlin/Any|
Static scope owner symbol: FirRegularClassSymbol public open class Base : R|kotlin/Any|
Element 8
Scope: FirLocalScope
Properties:
FirValueParameterSymbol primaryConstructorParameter: R|test/Base.Nested|
FILE: [ResolvedTo(IMPORTS)] superTypeCallArgumentsExpression.kt
public open [ResolvedTo(STATUS)] class Base : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor([ResolvedTo(STATUS)] param: R|test/Base.Nested|): R|test/Base| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(STATUS)] class Nested : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| {
LAZY_super<R|kotlin/Any|>
}
}
}
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/Base|>(R|<local>/primaryConstructorParameter|)
}
}
@@ -0,0 +1,9 @@
package test
open class Base(param: Nested) {
class Nested
}
fun <T> materialize(): T = TODO()
class Child(primaryConstructorParameter: Nested) : Base(materialize<<expr>Nested</expr>>())
@@ -0,0 +1,48 @@
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: FirNestedClassifierScopeWithSubstitution
Classifiers:
FirRegularClassSymbol public final class Nested : R|kotlin/Any|
Static scope owner symbol: FirRegularClassSymbol public open class Base : R|kotlin/Any|
Element 8
Scope: FirLocalScope
Properties:
FirValueParameterSymbol primaryConstructorParameter: R|test/Base.Nested|
FILE: [ResolvedTo(IMPORTS)] superTypeCallArgumentsTypeRef.kt
public open [ResolvedTo(STATUS)] class Base : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor([ResolvedTo(STATUS)] param: R|test/Base.Nested|): R|test/Base| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(STATUS)] class Nested : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| {
LAZY_super<R|kotlin/Any|>
}
}
}
public final [ResolvedTo(CONTRACTS)] fun <[ResolvedTo(CONTRACTS)] T> materialize(): R|T| {
^materialize TODO#()
}
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/Base|>(R|test/materialize|<R|test/Base.Nested|>())
}
}
@@ -0,0 +1,12 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package test
open class Base {
class Nested
}
class Child : <expr>Base</expr>()
@@ -0,0 +1,36 @@
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
FILE: [ResolvedTo(IMPORTS)] superTypeCallee.kt
public open [ResolvedTo(STATUS)] class Base : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor(): R|test/Base| {
LAZY_super<R|kotlin/Any|>
}
public? final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| {
LAZY_super<R|kotlin/Any|>
}
}
}
public final [ResolvedTo(STATUS)] class Child : R|test/Base| {
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Child| {
super<R|test/Base|>()
}
}
@@ -0,0 +1,7 @@
package test
open class Base<T> {
class Nested
}
class Child : Base<<expr>Any</expr>>()
@@ -0,0 +1,36 @@
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
FILE: [ResolvedTo(IMPORTS)] superTypeCalleeGenerics.kt
public open [ResolvedTo(STATUS)] class Base<[ResolvedTo(STATUS)] T> : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor<[ResolvedTo(STATUS)] T>(): R|test/Base<T>| {
LAZY_super<R|kotlin/Any|>
}
public? final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| {
LAZY_super<R|kotlin/Any|>
}
}
}
public final [ResolvedTo(STATUS)] class Child : R|test/Base<kotlin/Any>| {
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Child| {
super<R|test/Base<kotlin/Any>|>()
}
}
@@ -0,0 +1,9 @@
package test
interface MyInterface
open class Base {
class Nested : MyInterface
}
class Child(constructorParam: MyInterface) : Base(), MyInterface by <expr>Nested()</expr>
@@ -0,0 +1,49 @@
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: FirNestedClassifierScopeWithSubstitution
Classifiers:
FirRegularClassSymbol public final class Nested : R|test/MyInterface|
Static scope owner symbol: FirRegularClassSymbol public open class Base : R|kotlin/Any|
Element 8
Scope: FirLocalScope
Properties:
FirValueParameterSymbol constructorParam: R|test/MyInterface|
FILE: [ResolvedTo(IMPORTS)] superTypeDelegatedExpression.kt
public abstract [ResolvedTo(STATUS)] interface MyInterface : R|kotlin/Any| {
}
public open [ResolvedTo(STATUS)] class Base : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor(): R|test/Base| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(STATUS)] class Nested : R|test/MyInterface| {
public [ResolvedTo(STATUS)] constructor(): R|test/Base.Nested| {
LAZY_super<<implicit>>
}
}
}
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<R|test/Base|>()
}
private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|test/MyInterface| = R|test/Base.Nested.Nested|()
}
@@ -0,0 +1,11 @@
package test
interface MyInterface
open class Base {
class Nested : MyInterface
}
class Child : Base, <expr>MyInterface</expr> by Nested() {
constructor(): super()
}
@@ -0,0 +1,40 @@
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
FILE: [ResolvedTo(IMPORTS)] superTypeDelegatedTypeRef.kt
public abstract [ResolvedTo(STATUS)] interface MyInterface : R|kotlin/Any| {
}
public open [ResolvedTo(STATUS)] class Base : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor(): R|test/Base| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(STATUS)] class Nested : R|test/MyInterface| {
public [ResolvedTo(STATUS)] constructor(): R|test/Base.Nested| {
LAZY_super<<implicit>>
}
}
}
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<R|test/Base|>()
}
}
@@ -0,0 +1,14 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package test
open class Base {
class Nested
}
class Child : <expr>Base</expr> {
constructor(): super() {}
}
@@ -0,0 +1,36 @@
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
FILE: [ResolvedTo(IMPORTS)] superTypeRef.kt
public open [ResolvedTo(STATUS)] class Base : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor(): R|test/Base| {
LAZY_super<R|kotlin/Any|>
}
public? final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| {
LAZY_super<R|kotlin/Any|>
}
}
}
public final [ResolvedTo(STATUS)] class Child : R|test/Base| {
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Child| {
super<R|test/Base|>()
}
}
@@ -0,0 +1,14 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package test
open class Base<T> {
class Nested
}
class Child : Base<<expr>Any</expr>> {
constructor(): super() {}
}
@@ -0,0 +1,36 @@
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
FILE: [ResolvedTo(IMPORTS)] superTypeRefGenerics.kt
public open [ResolvedTo(STATUS)] class Base<[ResolvedTo(STATUS)] T> : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor<[ResolvedTo(STATUS)] T>(): R|test/Base<T>| {
LAZY_super<R|kotlin/Any|>
}
public? final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| {
LAZY_super<R|kotlin/Any|>
}
}
}
public final [ResolvedTo(STATUS)] class Child : R|test/Base<kotlin/Any>| {
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Child| {
super<R|test/Base<kotlin/Any>|>()
}
}
@@ -0,0 +1,12 @@
interface Foo {
fun foo(): Int
}
interface Bar {
fun bar(): Int
}
context(Foo, Bar)
fun test() {
<expr>foo() + bar()</expr>
}
@@ -0,0 +1,43 @@
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: FirLocalScope
Element 8
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 9
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] contextReceivers.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
public abstract [ResolvedTo(CONTRACTS)] fun foo(): R|kotlin/Int|
}
public abstract [ResolvedTo(STATUS)] interface Bar : R|kotlin/Any| {
public abstract [ResolvedTo(CONTRACTS)] fun bar(): R|kotlin/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|())
}
@@ -0,0 +1,10 @@
interface Foo {
fun foo(): Int
}
context(Foo)
class Test {
fun test() {
<expr>foo()</expr>
}
}
@@ -0,0 +1,47 @@
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
Implicit receiver:
FirRegularClassSymbol context(R|Foo|)
public final class Test : R|kotlin/Any|
Type: Test
Element 8
Context receivers:
FirRegularClassSymbol context(R|Foo|)
public final class Test : R|kotlin/Any|
Type: Foo
Label: Foo
Element 9
Scope: FirLocalScope
Element 10
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] contextReceiversClass.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
public abstract [ResolvedTo(CONTRACTS)] fun foo(): R|kotlin/Int|
}
context(R|Foo|)
public final [ResolvedTo(STATUS)] class Test : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor(): R|Test| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(BODY_RESOLVE)] fun test(): R|kotlin/Unit| {
this@R|/Test|.R|/Foo.foo|()
}
}
@@ -0,0 +1,23 @@
enum class Direction {
NORTH {
override val code: Int
get() = 1
},
EAST {
override val code: Int
get() = <expr>2</expr>
},
SOUTH {
override val code: Int
get() = 3
},
WEST {
override val code: Int
get() = 4
};
abstract val code: Int
}
@@ -0,0 +1,81 @@
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
Implicit receiver:
FirRegularClassSymbol public final companion object Companion : R|kotlin/Any|
Type: kotlin/Enum.Companion
Element 8
Scope: FirNestedClassifierScopeWithSubstitution
Classifiers:
FirRegularClassSymbol public final companion object Companion : R|kotlin/Any|
Static scope owner symbol: FirRegularClassSymbol public abstract class Enum<E : R|kotlin/Enum<E>|> : R|kotlin/Comparable<E>|, R|java/io/Serializable|
Element 9
Scope: FirNameAwareOnlyCallablesScope
Functions
FirNamedFunctionSymbol public final static fun valueOf(value: R|kotlin/String|): R|Direction|
FirNamedFunctionSymbol public final static fun values(): R|kotlin/Array<Direction>|
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<Direction>|
public get(): R|kotlin/enums/EnumEntries<Direction>|
Element 10
Implicit receiver:
FirAnonymousObjectSymbol object : R|Direction|
Type: <anonymous>
Element 11
Scope: FirLocalScope
Properties:
FirBackingFieldSymbol private <explicit backing field>: R|kotlin/Int|
Element 12
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] enumValue.kt
public final [ResolvedTo(STATUS)] enum class Direction : R|kotlin/Enum<Direction>| {
private [ResolvedTo(STATUS)] constructor(): R|Direction| {
LAZY_super<R|kotlin/Enum<Direction>|>
}
public final static [ResolvedTo(STATUS)] 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|<anonymous>| {
super<R|Direction|>()
}
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(STATUS)] enum entry SOUTH: R|Direction| = LAZY_EXPRESSION
public final static [ResolvedTo(STATUS)] enum entry WEST: R|Direction| = LAZY_EXPRESSION
public abstract [ResolvedTo(STATUS)] val code: R|kotlin/Int|
public [ResolvedTo(STATUS)] get(): R|kotlin/Int|
public final static [ResolvedTo(STATUS)] fun values(): R|kotlin/Array<Direction>| {
}
public final static [ResolvedTo(STATUS)] fun valueOf([ResolvedTo(STATUS)] value: R|kotlin/String|): R|Direction| {
}
public final static [ResolvedTo(STATUS)] val entries: R|kotlin/enums/EnumEntries<Direction>|
public [ResolvedTo(STATUS)] get(): R|kotlin/enums/EnumEntries<Direction>|
}
@@ -0,0 +1,5 @@
fun String.test() {
<expr>consume(this)</expr>
}
fun consume(obj: Any) {}
@@ -0,0 +1,30 @@
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: FirLocalScope
Element 8
Implicit receiver:
FirNamedFunctionSymbol public final fun R|kotlin/String|.test(): R|kotlin/Unit|
Type: kotlin/String
Element 9
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(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] obj: R|kotlin/Any|): R|kotlin/Unit| {
}
@@ -0,0 +1,13 @@
fun test() {
block("foo") foo@{
block(42) num@{
<expr>consume(this@foo.length + this@num)</expr>
}
}
}
fun <T> block(reciever: T, block: T.() -> Unit) {
receiver.block()
}
fun consume(num: Int) {}
@@ -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: FirLocalScope
Element 8
Scope: FirLocalScope
Element 9
Scope: FirLocalScope
Element 10
Implicit receiver:
FirAnonymousFunctionSymbol foo@fun R|kotlin/String|.<anonymous>(): R|kotlin/Unit| <inline=NoInline>
Type: kotlin/String
Element 11
Scope: FirLocalScope
Element 12
Scope: FirLocalScope
Element 13
Implicit receiver:
FirAnonymousFunctionSymbol num@fun R|kotlin/Int|.<anonymous>(): R|kotlin/Unit| <inline=NoInline>
Type: kotlin/Int
Element 14
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] extensionLambdas.kt
public final [ResolvedTo(BODY_RESOLVE)] fun test(): R|kotlin/Unit| {
R|/block|<R|kotlin/String|>(String(foo), <L> = [ResolvedTo(BODY_RESOLVE)] foo@fun R|kotlin/String|.<anonymous>(): R|kotlin/Unit| <inline=NoInline> {
R|/block|<R|kotlin/Int|>(Int(42), <L> = [ResolvedTo(BODY_RESOLVE)] num@fun R|kotlin/Int|.<anonymous>(): R|kotlin/Unit| <inline=NoInline> {
R|/consume|(this@R|special/anonymous|.R|kotlin/String.length|.R|kotlin/Int.plus|(this@R|special/anonymous|))
}
)
}
)
}
public final [ResolvedTo(CONTRACTS)] fun <[ResolvedTo(CONTRACTS)] T> block([ResolvedTo(CONTRACTS)] reciever: R|T|, [ResolvedTo(CONTRACTS)] block: R|T.() -> kotlin/Unit|): R|kotlin/Unit| {
receiver#.block#()
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] num: R|kotlin/Int|): R|kotlin/Unit| {
}
@@ -0,0 +1,15 @@
package <expr>test</expr>
import java.util.List
fun test() = List::class
fun other(): Int {
return "foo".length
}
class Foo {
fun foo() {
require(other() == 3)
}
}
@@ -0,0 +1,36 @@
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
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<java/util/List<*>>| {
^test <getClass>(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<R|kotlin/Any|>()
}
public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| {
<Unresolved name: require>#(==(R|test/other|(), Int(3)))
}
}
@@ -0,0 +1,11 @@
package test
class Foo<F> {
inner class Bar<B> {
fun test(f: F, b: B) {
<expr>consume(f)</expr>
}
}
}
fun consume(obj: Any) {}
@@ -0,0 +1,63 @@
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 F
Element 8
Scope: FirNestedClassifierScopeImpl
Classifiers:
FirRegularClassSymbol public final inner class Bar<B, Outer(F)> : R|kotlin/Any|
Element 9
Implicit receiver:
FirRegularClassSymbol public final class Foo<F> : R|kotlin/Any|
Type: test/Foo<F>
Element 10
Scope: FirMemberTypeParameterScope
Classifiers:
FirTypeParameterSymbol B
Element 11
Implicit receiver:
FirRegularClassSymbol public final inner class Bar<B, Outer(F)> : R|kotlin/Any|
Type: test/Foo.Bar<B, F>
Element 12
Scope: FirLocalScope
Properties:
FirValueParameterSymbol b: R|B|
FirValueParameterSymbol f: R|F|
Element 13
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] innerClasses.kt
public final [ResolvedTo(STATUS)] class Foo<[ResolvedTo(STATUS)] F> : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor<[ResolvedTo(STATUS)] F>(): R|test/Foo<F>| {
LAZY_super<R|kotlin/Any|>
}
public final inner [ResolvedTo(STATUS)] class Bar<[ResolvedTo(STATUS)] B, [ResolvedTo(STATUS)] Outer(F)> : R|kotlin/Any| {
public [ResolvedTo(STATUS)] test/Foo<F>.constructor<[ResolvedTo(STATUS)] B>(): R|test/Foo.Bar<B, F>| {
LAZY_super<R|kotlin/Any|>
}
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<Inapplicable(INAPPLICABLE): test/consume>#|(R|<local>/f|)
}
}
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] obj: R|kotlin/Any|): R|kotlin/Unit| {
}
@@ -0,0 +1,11 @@
fun test() {
block("foo") { s ->
block(42) { n ->
<expr>s.length + n</expr>
}
}
}
fun <T> block(obj: T, block: (T) -> Unit) {
block(obj)
}
@@ -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: FirLocalScope
Element 8
Scope: FirLocalScope
Element 9
Scope: FirLocalScope
Properties:
FirValueParameterSymbol s: R|kotlin/String|
Element 10
Scope: FirLocalScope
Element 11
Scope: FirLocalScope
Properties:
FirValueParameterSymbol n: R|kotlin/Int|
Element 12
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] lambdaArguments.kt
public final [ResolvedTo(BODY_RESOLVE)] fun test(): R|kotlin/Unit| {
R|/block|<R|kotlin/String|>(String(foo), <L> = [ResolvedTo(BODY_RESOLVE)] block@fun <anonymous>([ResolvedTo(BODY_RESOLVE)] s: R|kotlin/String|): R|kotlin/Unit| <inline=NoInline> {
R|/block|<R|kotlin/Int|>(Int(42), <L> = [ResolvedTo(BODY_RESOLVE)] block@fun <anonymous>([ResolvedTo(BODY_RESOLVE)] n: R|kotlin/Int|): R|kotlin/Unit| <inline=NoInline> {
R|<local>/s|.R|kotlin/String.length|.R|kotlin/Int.plus|(R|<local>/n|)
}
)
}
)
}
public final [ResolvedTo(CONTRACTS)] fun <[ResolvedTo(CONTRACTS)] T> block([ResolvedTo(CONTRACTS)] obj: R|T|, [ResolvedTo(CONTRACTS)] block: R|(T) -> kotlin/Unit|): R|kotlin/Unit| {
block#(obj#)
}
@@ -0,0 +1,9 @@
fun test() {
class Local {
fun foo(): String {
<expr>return "foo"</expr>
}
}
Local().foo()
}
@@ -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: FirLocalScope
Element 8
Scope: FirLocalScope
Classifiers:
FirRegularClassSymbol local final class Local : R|kotlin/Any|
Element 9
Implicit receiver:
FirRegularClassSymbol local final class Local : R|kotlin/Any|
Type: <local>/Local
Element 10
Scope: FirLocalScope
Element 11
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] localClass.kt
public final [ResolvedTo(BODY_RESOLVE)] fun test(): R|kotlin/Unit| {
local final [ResolvedTo(BODY_RESOLVE)] class Local : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|<local>/Local| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/String| {
^foo String(foo)
}
}
R|<local>/Local.Local|().R|<local>/foo|()
}
@@ -0,0 +1,11 @@
package test
class Foo<F> {
class Bar<B> {
fun test(b: B) {
<expr>consume(b)</expr>
}
}
}
fun consume(obj: Any) {}
@@ -0,0 +1,54 @@
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: FirNestedClassifierScopeImpl
Classifiers:
FirRegularClassSymbol public final class Bar<B> : R|kotlin/Any|
Element 8
Scope: FirMemberTypeParameterScope
Classifiers:
FirTypeParameterSymbol B
Element 9
Implicit receiver:
FirRegularClassSymbol public final class Bar<B> : R|kotlin/Any|
Type: test/Foo.Bar<B>
Element 10
Scope: FirLocalScope
Properties:
FirValueParameterSymbol b: R|B|
Element 11
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] nestedClasses.kt
public final [ResolvedTo(STATUS)] class Foo<[ResolvedTo(STATUS)] F> : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor<[ResolvedTo(STATUS)] F>(): R|test/Foo<F>| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(STATUS)] class Bar<[ResolvedTo(STATUS)] B> : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor<[ResolvedTo(STATUS)] B>(): R|test/Foo.Bar<B>| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] b: R|B|): R|kotlin/Unit| {
R|test/consume<Inapplicable(INAPPLICABLE): test/consume>#|(R|<local>/b|)
}
}
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] obj: R|kotlin/Any|): R|kotlin/Unit| {
}
@@ -0,0 +1,5 @@
class Foo(
val a: String = "foo"
val b: Int = <expr>a.length</expr>,
val c: Long = (a.length - 1).toLong()
)
@@ -0,0 +1,36 @@
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
Implicit receiver:
FirRegularClassSymbol public final class Foo : R|kotlin/Any|
Type: Foo
FILE: [ResolvedTo(IMPORTS)] primaryConstructorParameter.kt
public final [ResolvedTo(STATUS)] class Foo : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor([ResolvedTo(STATUS)] a: R|kotlin/String| = LAZY_EXPRESSION, [ResolvedTo(STATUS)] b: R|kotlin/Int| = LAZY_EXPRESSION, [ResolvedTo(STATUS)] c: R|kotlin/Long| = LAZY_EXPRESSION): R|Foo| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(STATUS)] val a: R|kotlin/String| = R|<local>/a|
public [ResolvedTo(STATUS)] get(): R|kotlin/String|
public final [ResolvedTo(BODY_RESOLVE)] val b: R|kotlin/Int| = R|<local>/b|
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int|
public final [ResolvedTo(STATUS)] val c: R|kotlin/Long| = R|<local>/c|
public [ResolvedTo(STATUS)] get(): R|kotlin/Long|
}
@@ -0,0 +1,16 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package test
interface MyInterface {
operator fun getValue(thisRef: Any, property: Any): MyInterface
}
class Foo(constructorParam: MyInterface) {
val regularProperty: MyInterface
val property: MyInterface by <expr>constructorParam</expr>
}
@@ -0,0 +1,43 @@
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
Implicit receiver:
FirRegularClassSymbol public final class Foo : R|kotlin/Any|
Type: test/Foo
Element 8
Scope: FirLocalScope
Properties:
FirValueParameterSymbol constructorParam: R|test/MyInterface|
FILE: [ResolvedTo(IMPORTS)] propertyDelegateInitializer.kt
public abstract [ResolvedTo(STATUS)] interface MyInterface : R|kotlin/Any| {
public abstract operator [ResolvedTo(CONTRACTS)] fun getValue([ResolvedTo(CONTRACTS)] thisRef: R|kotlin/Any|, [ResolvedTo(CONTRACTS)] property: R|kotlin/Any|): R|test/MyInterface|
}
public final [ResolvedTo(STATUS)] class Foo : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor([ResolvedTo(STATUS)] constructorParam: R|test/MyInterface|): R|test/Foo| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(STATUS)] val regularProperty: R|test/MyInterface|
public [ResolvedTo(STATUS)] get(): R|test/MyInterface|
public final [ResolvedTo(BODY_RESOLVE)] val property: R|test/MyInterface|by R|<local>/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|)
}
}
@@ -0,0 +1,24 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
fun before_Fun() {}
val before_Val = 10
class Before_OtherClass
class MyClass {
val foo = 10
fun usage() {
<expr>foo</expr>
}
}
fun after_Fun() {}
val after_Val = 10
class After_OtherClass
@@ -0,0 +1,105 @@
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: 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: <implicit>
public? get(): <implicit>
FirPropertySymbol public? final? val before_Val: <implicit>
public? get(): <implicit>
Element 8
Scope: FirLocalScope
Classifiers:
FirRegularClassSymbol public final class MyClass : R|kotlin/Any|
Properties:
FirPropertySymbol lval args: R|kotlin/Array<kotlin/String>|
Element 9
Context receivers:
FirScriptSymbol context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT:
lval args: R|kotlin/Array<kotlin/String>|
public? final? fun before_Fun(): R|kotlin/Unit|
public? final? val before_Val: <implicit>
public? get(): <implicit>
public? final? class Before_OtherClass : R|kotlin/Any|
public final class MyClass : R|kotlin/Any|
public? final? fun after_Fun(): R|kotlin/Unit|
public? final? val after_Val: <implicit>
public? get(): <implicit>
public? final? class After_OtherClass : R|kotlin/Any|
Type: kotlin/script/templates/standard/ScriptTemplateWithArgs
Label: <script>
Element 10
Implicit receiver:
FirRegularClassSymbol public final class MyClass : R|kotlin/Any|
Type: MyClass
Element 11
Scope: FirLocalScope
Element 12
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] insideClassMember.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public? final? [ResolvedTo(RAW_FIR)] fun before_Fun(): R|kotlin/Unit| { LAZY_BLOCK }
public? final? [ResolvedTo(RAW_FIR)] val before_Val: <implicit> = LAZY_EXPRESSION
public? [ResolvedTo(RAW_FIR)] get(): <implicit>
public? final? [ResolvedTo(RAW_FIR)] class Before_OtherClass : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] constructor(): R|Before_OtherClass| {
LAZY_super<R|kotlin/Any|>
}
}
public final [ResolvedTo(STATUS)] class MyClass : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor(): R|MyClass| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val foo: R|kotlin/Int| = Int(10)
public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/Int|
public final [ResolvedTo(BODY_RESOLVE)] fun usage(): R|kotlin/Unit| {
this@R|/MyClass|.R|/MyClass.foo|
}
}
public? final? [ResolvedTo(RAW_FIR)] fun after_Fun(): R|kotlin/Unit| { LAZY_BLOCK }
public? final? [ResolvedTo(RAW_FIR)] val after_Val: <implicit> = LAZY_EXPRESSION
public? [ResolvedTo(RAW_FIR)] get(): <implicit>
public? final? [ResolvedTo(RAW_FIR)] class After_OtherClass : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] constructor(): R|After_OtherClass| {
LAZY_super<R|kotlin/Any|>
}
}
@@ -0,0 +1,20 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
fun before_Fun() {}
val before_Val = 10
class Before_OtherClass
fun usage(foo: Int) {
<expr>foo</expr>
}
fun after_Fun() {}
val after_Val = 10
class After_OtherClass
@@ -0,0 +1,93 @@
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: FirScriptDeclarationsScope
Classifiers:
FirRegularClassSymbol public? final? class After_OtherClass : R|kotlin/Any|
FirRegularClassSymbol public? final? class Before_OtherClass : R|kotlin/Any|
Functions
FirNamedFunctionSymbol public? final? fun after_Fun(): R|kotlin/Unit|
FirNamedFunctionSymbol public? final? fun before_Fun(): R|kotlin/Unit|
FirNamedFunctionSymbol public final fun usage(foo: R|kotlin/Int|): R|kotlin/Unit|
Properties:
FirPropertySymbol public? final? val after_Val: <implicit>
public? get(): <implicit>
FirPropertySymbol public? final? val before_Val: <implicit>
public? get(): <implicit>
Element 8
Scope: FirLocalScope
Functions
FirNamedFunctionSymbol public final fun usage(foo: R|kotlin/Int|): R|kotlin/Unit|
Properties:
FirPropertySymbol lval args: R|kotlin/Array<kotlin/String>|
Element 9
Context receivers:
FirScriptSymbol context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT:
lval args: R|kotlin/Array<kotlin/String>|
public? final? fun before_Fun(): R|kotlin/Unit|
public? final? val before_Val: <implicit>
public? get(): <implicit>
public? final? class Before_OtherClass : R|kotlin/Any|
public final fun usage(foo: R|kotlin/Int|): R|kotlin/Unit|
public? final? fun after_Fun(): R|kotlin/Unit|
public? final? val after_Val: <implicit>
public? get(): <implicit>
public? final? class After_OtherClass : R|kotlin/Any|
Type: kotlin/script/templates/standard/ScriptTemplateWithArgs
Label: <script>
Element 10
Scope: FirLocalScope
Properties:
FirValueParameterSymbol foo: R|kotlin/Int|
Element 11
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] insideTopLevelFunction.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public? final? [ResolvedTo(RAW_FIR)] fun before_Fun(): R|kotlin/Unit| { LAZY_BLOCK }
public? final? [ResolvedTo(RAW_FIR)] val before_Val: <implicit> = LAZY_EXPRESSION
public? [ResolvedTo(RAW_FIR)] get(): <implicit>
public? final? [ResolvedTo(RAW_FIR)] class Before_OtherClass : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] constructor(): R|Before_OtherClass| {
LAZY_super<R|kotlin/Any|>
}
}
public final [ResolvedTo(BODY_RESOLVE)] fun usage([ResolvedTo(BODY_RESOLVE)] foo: R|kotlin/Int|): R|kotlin/Unit| {
R|<local>/foo|
}
public? final? [ResolvedTo(RAW_FIR)] fun after_Fun(): R|kotlin/Unit| { LAZY_BLOCK }
public? final? [ResolvedTo(RAW_FIR)] val after_Val: <implicit> = LAZY_EXPRESSION
public? [ResolvedTo(RAW_FIR)] get(): <implicit>
public? final? [ResolvedTo(RAW_FIR)] class After_OtherClass : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] constructor(): R|After_OtherClass| {
LAZY_super<R|kotlin/Any|>
}
}
@@ -0,0 +1,18 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
fun before_Fun() {}
val before_Val = 10
class Before_OtherClass
<expr>args</expr>
fun after_Fun() {}
val after_Val = 10
class After_OtherClass
@@ -0,0 +1,87 @@
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: FirScriptDeclarationsScope
Classifiers:
FirRegularClassSymbol public final class After_OtherClass : R|kotlin/Any|
FirRegularClassSymbol public final class Before_OtherClass : 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: R|kotlin/Int|
public get(): R|kotlin/Int|
FirPropertySymbol public final val before_Val: R|kotlin/Int|
public get(): R|kotlin/Int|
Element 8
Scope: FirLocalScope
Classifiers:
FirRegularClassSymbol public final class Before_OtherClass : R|kotlin/Any|
Functions
FirNamedFunctionSymbol public final fun before_Fun(): R|kotlin/Unit|
Properties:
FirPropertySymbol lval args: R|kotlin/Array<kotlin/String>|
Element 9
Context receivers:
FirScriptSymbol context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT:
lval args: R|kotlin/Array<kotlin/String>|
public final fun before_Fun(): R|kotlin/Unit|
public final val before_Val: R|kotlin/Int|
public get(): R|kotlin/Int|
public final class Before_OtherClass : R|kotlin/Any|
args#
public final fun after_Fun(): R|kotlin/Unit|
public final val after_Val: R|kotlin/Int|
public get(): R|kotlin/Int|
public final class After_OtherClass : R|kotlin/Any|
Type: kotlin/script/templates/standard/ScriptTemplateWithArgs
Label: <script>
FILE: [ResolvedTo(IMPORTS)] topLevel.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(BODY_RESOLVE)] fun before_Fun(): R|kotlin/Unit| {
}
public final [ResolvedTo(BODY_RESOLVE)] val before_Val: R|kotlin/Int| = Int(10)
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int|
public final [ResolvedTo(STATUS)] class Before_OtherClass : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Before_OtherClass| {
super<R|kotlin/Any|>()
}
}
args#
public final [ResolvedTo(BODY_RESOLVE)] fun after_Fun(): R|kotlin/Unit| {
}
public final [ResolvedTo(BODY_RESOLVE)] val after_Val: R|kotlin/Int| = Int(10)
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int|
public final [ResolvedTo(STATUS)] class After_OtherClass : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor(): R|After_OtherClass| {
LAZY_super<R|kotlin/Any|>
}
}
@@ -0,0 +1,19 @@
package foo
class Foo {
val a: Int
fun foo(p: String) {
val x = 1.0f
<expr>print(x)</expr>
}
}
class Unrelated {
val unrelatedMember: Boolean
get() = true
}
fun unrelatedFunction(): Int {
return "foo".length
}
@@ -0,0 +1,53 @@
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
Implicit receiver:
FirRegularClassSymbol public final class Foo : R|kotlin/Any|
Type: foo/Foo
Element 8
Scope: FirLocalScope
Properties:
FirValueParameterSymbol p: R|kotlin/String|
Element 9
Scope: FirLocalScope
Properties:
FirPropertySymbol lval x: R|kotlin/Float|
FILE: [ResolvedTo(IMPORTS)] simple.kt
public final [ResolvedTo(STATUS)] class Foo : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor(): R|foo/Foo| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(STATUS)] val a: R|kotlin/Int|
public [ResolvedTo(STATUS)] get(): R|kotlin/Int|
public final [ResolvedTo(BODY_RESOLVE)] fun foo([ResolvedTo(BODY_RESOLVE)] p: R|kotlin/String|): R|kotlin/Unit| {
[ResolvedTo(BODY_RESOLVE)] lval x: R|kotlin/Float| = Float(1.0)
<Unresolved name: print>#(R|<local>/x|)
}
}
public? final? [ResolvedTo(RAW_FIR)] class Unrelated : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] constructor(): R|foo/Unrelated| {
LAZY_super<R|kotlin/Any|>
}
public? final? [ResolvedTo(RAW_FIR)] val unrelatedMember: Boolean
public? [ResolvedTo(RAW_FIR)] get(): Boolean { LAZY_BLOCK }
}
public? final? [ResolvedTo(RAW_FIR)] fun unrelatedFunction(): Int { LAZY_BLOCK }
@@ -0,0 +1,10 @@
interface Foo {}
fun test(obj: Any) {
if (obj is Foo) {
consume(obj)
}
<expr>obj.hashCode()</expr>
}
fun consume(obj: Foo) {}
@@ -0,0 +1,36 @@
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: FirLocalScope
Properties:
FirValueParameterSymbol obj: R|kotlin/Any|
Element 8
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] afterIf.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
}
public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] obj: R|kotlin/Any|): R|kotlin/Unit| {
when () {
(R|<local>/obj| is R|Foo|) -> {
R|/consume|(R|<local>/obj|)
}
}
R|<local>/obj|.R|kotlin/Any.hashCode|()
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] obj: R|Foo|): R|kotlin/Unit| {
}
@@ -0,0 +1,17 @@
interface Node {
val shouldProcess: Boolean
val parent: Node?
}
fun test(initial: Node?) {
var current = initial
while (current!!.shouldProcess) {
consume(current)
current = current.parent
}
<expr>consume(current)</expr>
}
fun consume(node: Node) {}
@@ -0,0 +1,48 @@
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: FirLocalScope
Properties:
FirValueParameterSymbol initial: R|Node?|
Element 8
Scope: FirLocalScope
Properties:
FirPropertySymbol lvar current: R|Node?|
Smart Casts:
FirPropertySymbol lvar current: R|Node?|
Types:
kotlin/Any
FILE: [ResolvedTo(IMPORTS)] afterLoop.kt
public abstract [ResolvedTo(STATUS)] interface Node : R|kotlin/Any| {
public abstract [ResolvedTo(CONTRACTS)] val shouldProcess: R|kotlin/Boolean|
public [ResolvedTo(CONTRACTS)] get(): R|kotlin/Boolean|
public abstract [ResolvedTo(CONTRACTS)] val parent: R|Node?|
public [ResolvedTo(CONTRACTS)] get(): R|Node?|
}
public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] initial: R|Node?|): R|kotlin/Unit| {
[ResolvedTo(BODY_RESOLVE)] lvar current: R|Node?| = R|<local>/initial|
while(R|<local>/current|!!.R|/Node.shouldProcess|) {
R|/consume|(R|<local>/current|)
R|<local>/current| = R|<local>/current|.R|/Node.parent|
}
R|/consume|(R|<local>/current|)
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] node: R|Node|): R|kotlin/Unit| {
}
@@ -0,0 +1,11 @@
interface Foo {
val isValid: Boolean
}
fun test(obj: Any) {
if (obj is Foo && <expr>obj.isValid</expr>) {
consume(obj)
}
}
fun consume(obj: Foo) {}
@@ -0,0 +1,43 @@
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: FirLocalScope
Properties:
FirValueParameterSymbol obj: R|kotlin/Any|
Element 8
Scope: FirLocalScope
Smart Casts:
FirValueParameterSymbol obj: R|kotlin/Any|
Types:
Foo
kotlin/Any
FILE: [ResolvedTo(IMPORTS)] andRight.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
public abstract [ResolvedTo(CONTRACTS)] val isValid: R|kotlin/Boolean|
public [ResolvedTo(CONTRACTS)] get(): R|kotlin/Boolean|
}
public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] obj: R|kotlin/Any|): R|kotlin/Unit| {
when () {
(R|<local>/obj| is R|Foo|) && R|<local>/obj|.R|/Foo.isValid| -> {
R|/consume|(R|<local>/obj|)
}
}
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] obj: R|Foo|): R|kotlin/Unit| {
}
@@ -0,0 +1,9 @@
interface Foo {}
fun test(obj: Any) {
if (obj is Foo) {
<expr>consume(obj)</expr>
}
}
fun consume(obj: Foo) {}
@@ -0,0 +1,42 @@
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: FirLocalScope
Properties:
FirValueParameterSymbol obj: R|kotlin/Any|
Element 8
Scope: FirLocalScope
Element 9
Scope: FirLocalScope
Smart Casts:
FirValueParameterSymbol obj: R|kotlin/Any|
Types:
Foo
kotlin/Any
FILE: [ResolvedTo(IMPORTS)] argument.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
}
public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] obj: R|kotlin/Any|): R|kotlin/Unit| {
when () {
(R|<local>/obj| is R|Foo|) -> {
R|/consume|(R|<local>/obj|)
}
}
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] obj: R|Foo|): R|kotlin/Unit| {
}
@@ -0,0 +1,12 @@
interface Foo {}
interface Bar {}
fun test(obj: Any) {
if (obj is Foo) {
if (obj is Bar) {
<expr>obj.consume(obj)</expr>
}
}
}
fun Bar.consume(obj: Foo) {}
@@ -0,0 +1,52 @@
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: FirLocalScope
Properties:
FirValueParameterSymbol obj: R|kotlin/Any|
Element 8
Scope: FirLocalScope
Element 9
Scope: FirLocalScope
Element 10
Scope: FirLocalScope
Smart Casts:
FirValueParameterSymbol obj: R|kotlin/Any|
Types:
Foo
kotlin/Any
Bar
FILE: [ResolvedTo(IMPORTS)] argumentAsReceiver.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
}
public abstract [ResolvedTo(STATUS)] interface Bar : R|kotlin/Any| {
}
public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] obj: R|kotlin/Any|): R|kotlin/Unit| {
when () {
(R|<local>/obj| is R|Foo|) -> {
when () {
(R|<local>/obj| is R|Bar|) -> {
R|<local>/obj|.R|/consume|(R|<local>/obj|)
}
}
}
}
}
public final [ResolvedTo(CONTRACTS)] fun R|Bar|.consume([ResolvedTo(CONTRACTS)] obj: R|Foo|): R|kotlin/Unit| {
}
@@ -0,0 +1,10 @@
interface Foo {}
fun test(obj: Any) {
<expr>obj.hashCode()</expr>
if (obj is Foo) {
consume(obj)
}
}
fun consume(obj: Foo) {}
@@ -0,0 +1,36 @@
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: FirLocalScope
Properties:
FirValueParameterSymbol obj: R|kotlin/Any|
Element 8
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] beforeIf.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
}
public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] obj: R|kotlin/Any|): R|kotlin/Unit| {
R|<local>/obj|.R|kotlin/Any.hashCode|()
when () {
(R|<local>/obj| is R|Foo|) -> {
R|/consume|(R|<local>/obj|)
}
}
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] obj: R|Foo|): R|kotlin/Unit| {
}
@@ -0,0 +1,14 @@
interface Node {
val parent: Node?
}
fun test(initial: Node) {
<expr>var current = initial</expr>
while (current != null) {
consume(current)
current = current.parent
}
}
fun consume(node: Node) {}
@@ -0,0 +1,38 @@
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: FirLocalScope
Properties:
FirValueParameterSymbol initial: R|Node|
Element 8
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] beforeLoop.kt
public abstract [ResolvedTo(STATUS)] interface Node : R|kotlin/Any| {
public abstract [ResolvedTo(CONTRACTS)] val parent: R|Node?|
public [ResolvedTo(CONTRACTS)] get(): R|Node?|
}
public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] initial: R|Node|): R|kotlin/Unit| {
[ResolvedTo(BODY_RESOLVE)] lvar current: R|Node| = R|<local>/initial|
while(!=(R|<local>/current|, Null(null))) {
R|/consume|(R|<local>/current|)
R|<local>/current| = R|<local>/current|.R|/Node.parent|
}
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] node: R|Node|): R|kotlin/Unit| {
}
@@ -0,0 +1,11 @@
open class Foo {
fun foo() {
if (this is Bar) {
<expr>consume(this)</expr>
}
}
}
class Bar : Foo()
fun consume(obj: Bar) {}
@@ -0,0 +1,55 @@
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
Implicit receiver:
FirRegularClassSymbol public open class Foo : R|kotlin/Any|
Type: Bar
Element 8
Scope: FirLocalScope
Element 9
Scope: FirLocalScope
Element 10
Scope: FirLocalScope
Smart Casts:
FirRegularClassSymbol public open class Foo : R|kotlin/Any|
Types:
Bar
kotlin/Any
FILE: [ResolvedTo(IMPORTS)] dispatchReceiver.kt
public open [ResolvedTo(STATUS)] class Foo : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor(): R|Foo| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| {
when () {
(this@R|/Foo| is R|Bar|) -> {
R|/consume|(this@R|/Foo|)
}
}
}
}
public final [ResolvedTo(STATUS)] class Bar : R|Foo| {
public [ResolvedTo(STATUS)] constructor(): R|Bar| {
LAZY_super<R|Foo|>
}
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] obj: R|Bar|): R|kotlin/Unit| {
}
@@ -0,0 +1,9 @@
interface Foo {}
fun Any.test() {
if (this is Foo) {
<expr>consume(this)</expr>
}
}
fun consume(obj: Foo) {}
@@ -0,0 +1,44 @@
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: FirLocalScope
Element 8
Implicit receiver:
FirNamedFunctionSymbol public final fun R|kotlin/Any|.test(): R|kotlin/Unit|
Type: Foo
Element 9
Scope: FirLocalScope
Element 10
Scope: FirLocalScope
Smart Casts:
FirNamedFunctionSymbol public final fun R|kotlin/Any|.test(): R|kotlin/Unit|
Types:
Foo
kotlin/Any
FILE: [ResolvedTo(IMPORTS)] extensionReceiver.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
}
public final [ResolvedTo(BODY_RESOLVE)] fun R|kotlin/Any|.test(): R|kotlin/Unit| {
when () {
(this@R|/test| is R|Foo|) -> {
R|/consume|(this@R|/test|)
}
}
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] obj: R|Foo|): R|kotlin/Unit| {
}
@@ -0,0 +1,7 @@
fun foo(param: String?): String {
param?.let {
return <expr>param</expr>
}
return ""
}
@@ -0,0 +1,40 @@
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: FirLocalScope
Properties:
FirValueParameterSymbol param: R|kotlin/String?|
Element 8
Scope: FirLocalScope
Element 9
Scope: FirLocalScope
Properties:
FirValueParameterSymbol it: R|kotlin/String|
Element 10
Scope: FirLocalScope
Smart Casts:
FirValueParameterSymbol param: R|kotlin/String?|
Types:
kotlin/Any
FILE: [ResolvedTo(IMPORTS)] insideLetOnNullableReceiver.kt
public final [ResolvedTo(BODY_RESOLVE)] fun foo([ResolvedTo(BODY_RESOLVE)] param: R|kotlin/String?|): R|kotlin/String| {
R|<local>/param|?.{ $subj$.R|kotlin/let|<R|kotlin/String|, R|kotlin/Nothing|>(<L> = [ResolvedTo(BODY_RESOLVE)] let@fun <anonymous>([ResolvedTo(BODY_RESOLVE)] it: R|kotlin/String|): R|kotlin/Nothing| <inline=Inline, kind=EXACTLY_ONCE> {
^foo R|<local>/param|
}
) }
^foo String()
}
@@ -0,0 +1,14 @@
interface Node {
val parent: Node?
}
fun test(initial: Node) {
var current = initial
while (current != null) {
<expr>consume(current)</expr>
current = current.parent
}
}
fun consume(node: Node) {}
@@ -0,0 +1,46 @@
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: FirLocalScope
Properties:
FirValueParameterSymbol initial: R|Node|
Element 8
Scope: FirLocalScope
Properties:
FirPropertySymbol lvar current: R|Node|
Element 9
Scope: FirLocalScope
Smart Casts:
FirPropertySymbol lvar current: R|Node|
Types:
kotlin/Any
FILE: [ResolvedTo(IMPORTS)] insideLoop.kt
public abstract [ResolvedTo(STATUS)] interface Node : R|kotlin/Any| {
public abstract [ResolvedTo(CONTRACTS)] val parent: R|Node?|
public [ResolvedTo(CONTRACTS)] get(): R|Node?|
}
public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] initial: R|Node|): R|kotlin/Unit| {
[ResolvedTo(BODY_RESOLVE)] lvar current: R|Node| = R|<local>/initial|
while(!=(R|<local>/current|, Null(null))) {
R|/consume|(R|<local>/current|)
R|<local>/current| = R|<local>/current|.R|/Node.parent|
}
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] node: R|Node|): R|kotlin/Unit| {
}
@@ -0,0 +1,13 @@
interface Foo {
val isValid: Boolean
}
fun test(obj: Any) {
if (obj is Foo || <expr>isValid(obj)</expr>) {
consume(obj)
}
}
fun isValid(obj: Any): Boolean = true
fun consume(obj: Foo) {}
@@ -0,0 +1,41 @@
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: FirLocalScope
Properties:
FirValueParameterSymbol obj: R|kotlin/Any|
Element 8
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] orRight.kt
public? final? [ResolvedTo(RAW_FIR)] interface Foo : R|kotlin/Any| {
public? final? [ResolvedTo(RAW_FIR)] val isValid: Boolean
public? [ResolvedTo(RAW_FIR)] get(): Boolean
}
public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] obj: R|kotlin/Any|): R|kotlin/Unit| {
when () {
(R|<local>/obj| is R|Foo|) || R|/isValid|(R|<local>/obj|) -> {
R|/consume<Inapplicable(INAPPLICABLE): /consume>#|(R|<local>/obj|)
}
}
}
public final [ResolvedTo(CONTRACTS)] fun isValid([ResolvedTo(CONTRACTS)] obj: R|kotlin/Any|): R|kotlin/Boolean| {
^isValid Boolean(true)
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] obj: R|Foo|): R|kotlin/Unit| {
}
@@ -0,0 +1,9 @@
interface Foo {}
fun test(obj: Any, another: Foo) {
if (obj is Foo) {
<expr>consume(another)</expr>
}
}
fun consume(obj: Foo) {}
@@ -0,0 +1,43 @@
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: FirLocalScope
Properties:
FirValueParameterSymbol another: R|Foo|
FirValueParameterSymbol obj: R|kotlin/Any|
Element 8
Scope: FirLocalScope
Element 9
Scope: FirLocalScope
Smart Casts:
FirValueParameterSymbol obj: R|kotlin/Any|
Types:
Foo
kotlin/Any
FILE: [ResolvedTo(IMPORTS)] plainCheck.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
}
public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] obj: R|kotlin/Any|, [ResolvedTo(BODY_RESOLVE)] another: R|Foo|): R|kotlin/Unit| {
when () {
(R|<local>/obj| is R|Foo|) -> {
R|/consume|(R|<local>/another|)
}
}
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] obj: R|Foo|): R|kotlin/Unit| {
}
@@ -0,0 +1,10 @@
// WITH_STDLIB
interface Foo
fun test(obj: Any) {
require(obj is Foo)
<expr>consume(obj)</expr>
}
fun consume(obj: Any) {}
@@ -0,0 +1,36 @@
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: FirLocalScope
Properties:
FirValueParameterSymbol obj: R|kotlin/Any|
Element 8
Scope: FirLocalScope
Smart Casts:
FirValueParameterSymbol obj: R|kotlin/Any|
Types:
Foo
kotlin/Any
FILE: [ResolvedTo(IMPORTS)] require.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
}
public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] obj: R|kotlin/Any|): R|kotlin/Unit| {
R|kotlin/require|((R|<local>/obj| is R|Foo|))
R|/consume|(R|<local>/obj|)
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] obj: R|kotlin/Any|): R|kotlin/Unit| {
}
@@ -0,0 +1,14 @@
interface Foo {
fun foo()
}
interface Bar {
fun bar()
}
fun test(obj: Any) {
when (obj) {
is Foo -> obj.foo()
is Bar -> <expr>obj.bar()</expr>
}
}
@@ -0,0 +1,49 @@
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: FirLocalScope
Properties:
FirValueParameterSymbol obj: R|kotlin/Any|
Element 8
Scope: FirLocalScope
Element 9
Scope: FirLocalScope
Smart Casts:
FirValueParameterSymbol obj: R|kotlin/Any|
Types:
Bar
kotlin/Any
FILE: [ResolvedTo(IMPORTS)] when.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
public abstract [ResolvedTo(CONTRACTS)] fun foo(): R|kotlin/Unit|
}
public abstract [ResolvedTo(STATUS)] interface Bar : R|kotlin/Any| {
public abstract [ResolvedTo(CONTRACTS)] fun bar(): R|kotlin/Unit|
}
public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] obj: R|kotlin/Any|): R|kotlin/Unit| {
when (R|<local>/obj|) {
($subj$ is R|Foo|) -> {
R|<local>/obj|.R|/Foo.foo|()
}
($subj$ is R|Bar|) -> {
R|<local>/obj|.R|/Bar.bar|()
}
}
}
@@ -0,0 +1,4 @@
package test
context(<expr>MyParam</expr>)
class Outer<MyParam>
@@ -0,0 +1,28 @@
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 MyParam
FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromContextReceiver.kt
context(R|MyParam|)
public final [ResolvedTo(STATUS)] class Outer<[ResolvedTo(STATUS)] MyParam> : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(STATUS)] MyParam>(): R|test/Outer<MyParam>| {
super<R|kotlin/Any|>()
}
}
@@ -0,0 +1,5 @@
package test
class Outer<MyParam> {
inner class Inner<T : <expr>MyParam</expr>>
}
@@ -0,0 +1,46 @@
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 MyParam
Element 8
Scope: FirNestedClassifierScopeImpl
Classifiers:
FirRegularClassSymbol public final inner class Inner<T : R|MyParam|, Outer(MyParam)> : R|kotlin/Any|
Element 9
Implicit receiver:
FirRegularClassSymbol public final class Outer<MyParam> : R|kotlin/Any|
Type: test/Outer<MyParam>
Element 10
Scope: FirMemberTypeParameterScope
Classifiers:
FirTypeParameterSymbol T : R|MyParam|
FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromInner_typeBound.kt
public final [ResolvedTo(STATUS)] class Outer<[ResolvedTo(STATUS)] MyParam> : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(STATUS)] MyParam>(): R|test/Outer<MyParam>| {
super<R|kotlin/Any|>()
}
public final inner [ResolvedTo(STATUS)] class Inner<[ResolvedTo(STATUS)] T : R|MyParam|, [ResolvedTo(STATUS)] Outer(MyParam)> : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] test/Outer<MyParam>.constructor<[ResolvedTo(STATUS)] T : R|MyParam|>(): R|test/Outer.Inner<T, MyParam>| {
super<R|kotlin/Any|>()
}
}
}
@@ -0,0 +1,7 @@
package test
class Outer<MyParam> {
inner class Inner {
fun member(p: <expr>MyParam</expr>) {}
}
}
@@ -0,0 +1,55 @@
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 MyParam
Element 8
Scope: FirNestedClassifierScopeImpl
Classifiers:
FirRegularClassSymbol public final inner class Inner<Outer(MyParam)> : R|kotlin/Any|
Element 9
Implicit receiver:
FirRegularClassSymbol public final class Outer<MyParam> : R|kotlin/Any|
Type: test/Outer<MyParam>
Element 10
Scope: FirMemberTypeParameterScope
Element 11
Implicit receiver:
FirRegularClassSymbol public final inner class Inner<Outer(MyParam)> : R|kotlin/Any|
Type: test/Outer.Inner<MyParam>
Element 12
Scope: FirLocalScope
Properties:
FirValueParameterSymbol p: R|MyParam|
FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromInner_typeRefInMember.kt
public final [ResolvedTo(STATUS)] class Outer<[ResolvedTo(STATUS)] MyParam> : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(STATUS)] MyParam>(): R|test/Outer<MyParam>| {
super<R|kotlin/Any|>()
}
public final inner [ResolvedTo(STATUS)] class Inner<[ResolvedTo(STATUS)] Outer(MyParam)> : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] test/Outer<MyParam>.constructor(): R|test/Outer.Inner<MyParam>| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(BODY_RESOLVE)] fun member([ResolvedTo(BODY_RESOLVE)] p: R|MyParam|): R|kotlin/Unit| {
}
}
}
@@ -0,0 +1,6 @@
package test
class Outer<MyParam> {
// TODO this test has an error, MyParam should not be resolved here. See KT-61959
class Nested<T : <expr>MyParam</expr>>
}
@@ -0,0 +1,46 @@
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 MyParam
Element 8
Scope: FirNestedClassifierScopeImpl
Classifiers:
FirRegularClassSymbol public final class Nested<T : R|MyParam|> : R|kotlin/Any|
Element 9
Implicit receiver:
FirRegularClassSymbol public final class Outer<MyParam> : R|kotlin/Any|
Type: test/Outer<MyParam>
Element 10
Scope: FirMemberTypeParameterScope
Classifiers:
FirTypeParameterSymbol T : R|MyParam|
FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromNested_typeBound.kt
public final [ResolvedTo(STATUS)] class Outer<[ResolvedTo(STATUS)] MyParam> : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(STATUS)] MyParam>(): R|test/Outer<MyParam>| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] class Nested<[ResolvedTo(STATUS)] T : R|MyParam|> : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(STATUS)] T : R|MyParam|>(): R|test/Outer.Nested<T>| {
super<R|kotlin/Any|>()
}
}
}
@@ -0,0 +1,7 @@
package test
class Outer<MyParam> {
class Nested {
fun member(p: <expr>MyParam</expr>) {}
}
}
@@ -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: FirNestedClassifierScopeImpl
Classifiers:
FirRegularClassSymbol public final class Nested : R|kotlin/Any|
Element 8
Implicit receiver:
FirRegularClassSymbol public final class Nested : R|kotlin/Any|
Type: test/Outer.Nested
Element 9
Scope: FirLocalScope
Properties:
FirValueParameterSymbol p: <ERROR TYPE REF: Symbol not found for MyParam>
FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromNested_typeRefInMember.kt
public final [ResolvedTo(STATUS)] class Outer<[ResolvedTo(STATUS)] MyParam> : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(STATUS)] MyParam>(): R|test/Outer<MyParam>| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(STATUS)] class Nested : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Outer.Nested| {
super<R|kotlin/Any|>()
}
public final [ResolvedTo(BODY_RESOLVE)] fun member([ResolvedTo(BODY_RESOLVE)] p: <ERROR TYPE REF: Symbol not found for MyParam>): R|kotlin/Unit| {
}
}
}
@@ -0,0 +1,5 @@
package test
open class Base<T>
class Outer<MyParam> : Base<<expr>MyParam</expr>>()
@@ -0,0 +1,33 @@
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 MyParam
FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromSuperType.kt
public open [ResolvedTo(STATUS)] class Base<[ResolvedTo(STATUS)] T> : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor<[ResolvedTo(STATUS)] T>(): R|test/Base<T>| {
LAZY_super<R|kotlin/Any|>
}
}
public final [ResolvedTo(STATUS)] class Outer<[ResolvedTo(STATUS)] MyParam> : R|test/Base<MyParam>| {
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(STATUS)] MyParam>(): R|test/Outer<MyParam>| {
super<R|test/Base<MyParam>|>()
}
}
@@ -0,0 +1,3 @@
package test
class Outer<MyParam, Other : <expr>MyParam</expr>>
@@ -0,0 +1,28 @@
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 MyParam
FirTypeParameterSymbol Other : R|MyParam|
FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromTypeBound.kt
public final [ResolvedTo(STATUS)] class Outer<[ResolvedTo(STATUS)] MyParam, [ResolvedTo(STATUS)] Other : R|MyParam|> : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(STATUS)] MyParam, [ResolvedTo(STATUS)] Other : R|MyParam|>(): R|test/Outer<MyParam, Other>| {
super<R|kotlin/Any|>()
}
}