FIR: set anonymous object constructor return type properly

This commit is contained in:
Mikhail Glukhikh
2020-03-10 14:40:05 +03:00
parent d1739289c6
commit 1812b490a1
49 changed files with 54 additions and 71 deletions
@@ -496,7 +496,7 @@ class DeclarationsConverter(
} }
superTypeRefs.ifEmpty { superTypeRefs += implicitAnyType } superTypeRefs.ifEmpty { superTypeRefs += implicitAnyType }
val delegatedType = delegatedSuperTypeRef ?: implicitAnyType val delegatedSuperType = delegatedSuperTypeRef ?: implicitAnyType
return withChildClassName(ANONYMOUS_OBJECT_NAME) { return withChildClassName(ANONYMOUS_OBJECT_NAME) {
buildAnonymousObject { buildAnonymousObject {
@@ -505,16 +505,17 @@ class DeclarationsConverter(
classKind = ClassKind.OBJECT classKind = ClassKind.OBJECT
scopeProvider = baseScopeProvider scopeProvider = baseScopeProvider
symbol = FirAnonymousObjectSymbol() symbol = FirAnonymousObjectSymbol()
val delegatedSelfType = objectLiteral.toDelegatedSelfType(this)
annotations += modifiers.annotations annotations += modifiers.annotations
this.superTypeRefs += superTypeRefs this.superTypeRefs += superTypeRefs
typeRef = superTypeRefs.first() typeRef = delegatedSelfType
val classWrapper = ClassWrapper( val classWrapper = ClassWrapper(
SpecialNames.NO_NAME_PROVIDED, modifiers, ClassKind.OBJECT, hasPrimaryConstructor = false, SpecialNames.NO_NAME_PROVIDED, modifiers, ClassKind.OBJECT, hasPrimaryConstructor = false,
hasSecondaryConstructor = classBody.getChildNodesByType(SECONDARY_CONSTRUCTOR).isNotEmpty(), hasSecondaryConstructor = classBody.getChildNodesByType(SECONDARY_CONSTRUCTOR).isNotEmpty(),
hasDefaultConstructor = false, hasDefaultConstructor = false,
delegatedSelfTypeRef = delegatedType, delegatedSelfTypeRef = delegatedSelfType,
delegatedSuperTypeRef = delegatedType, delegatedSuperTypeRef = delegatedSuperType,
superTypeCallEntry = superTypeCallEntry superTypeCallEntry = superTypeCallEntry
) )
//parse primary constructor //parse primary constructor
@@ -15,10 +15,7 @@ import org.jetbrains.kotlin.fir.declarations.FirConstructor
import org.jetbrains.kotlin.fir.declarations.FirProperty import org.jetbrains.kotlin.fir.declarations.FirProperty
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
import org.jetbrains.kotlin.fir.declarations.addDeclaration import org.jetbrains.kotlin.fir.declarations.addDeclaration
import org.jetbrains.kotlin.fir.declarations.builder.AbstractFirRegularClassBuilder import org.jetbrains.kotlin.fir.declarations.builder.*
import org.jetbrains.kotlin.fir.declarations.builder.buildErrorFunction
import org.jetbrains.kotlin.fir.declarations.builder.buildSimpleFunction
import org.jetbrains.kotlin.fir.declarations.builder.buildValueParameter
import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl
import org.jetbrains.kotlin.fir.diagnostics.DiagnosticKind import org.jetbrains.kotlin.fir.diagnostics.DiagnosticKind
import org.jetbrains.kotlin.fir.diagnostics.FirSimpleDiagnostic import org.jetbrains.kotlin.fir.diagnostics.FirSimpleDiagnostic
@@ -150,6 +147,13 @@ abstract class BaseFirBuilder<T>(val baseSession: FirSession, val context: Conte
} }
} }
fun T?.toDelegatedSelfType(firObject: FirAnonymousObjectBuilder): FirResolvedTypeRef {
return buildResolvedTypeRef {
source = this@toDelegatedSelfType?.toFirSourceElement()
type = ConeClassLikeTypeImpl(firObject.symbol.toLookupTag(), emptyArray(), false)
}
}
fun typeParametersFromSelfType(delegatedSelfTypeRef: FirTypeRef): List<FirTypeParameter> { fun typeParametersFromSelfType(delegatedSelfTypeRef: FirTypeRef): List<FirTypeParameter> {
return delegatedSelfTypeRef.coneTypeSafe<ConeKotlinType>() return delegatedSelfTypeRef.coneTypeSafe<ConeKotlinType>()
?.typeArguments ?.typeArguments
@@ -674,9 +674,10 @@ class RawFirBuilder(
classKind = ClassKind.OBJECT classKind = ClassKind.OBJECT
scopeProvider = baseScopeProvider scopeProvider = baseScopeProvider
symbol = FirAnonymousObjectSymbol() symbol = FirAnonymousObjectSymbol()
val delegatedSelfType = objectDeclaration.toDelegatedSelfType(this)
objectDeclaration.extractAnnotationsTo(this) objectDeclaration.extractAnnotationsTo(this)
objectDeclaration.extractSuperTypeListEntriesTo(this, null, null, ClassKind.CLASS) objectDeclaration.extractSuperTypeListEntriesTo(this, delegatedSelfType, null, ClassKind.CLASS)
typeRef = superTypeRefs.first() // TODO typeRef = delegatedSelfType
for (declaration in objectDeclaration.declarations) { for (declaration in objectDeclaration.declarations) {
declarations += declaration.toFirDeclaration( declarations += declaration.toFirDeclaration(
@@ -20,7 +20,7 @@ FILE: locals.kt
} }
lval code: <implicit> = object : Any { lval code: <implicit> = object : Any {
private constructor(): Any { private constructor(): R|anonymous| {
super<Any>() super<Any>()
} }
@@ -30,7 +30,7 @@ FILE: CallBasedInExpressionGenerator.kt
private final fun gen(argument: R|ERROR CLASS: Symbol not found, for `StackValue`|): R|ERROR CLASS: Symbol not found, for `BranchedValue`| { private final fun gen(argument: R|ERROR CLASS: Symbol not found, for `StackValue`|): R|ERROR CLASS: Symbol not found, for `BranchedValue`| {
^gen object : R|ERROR CLASS: Symbol not found, for `BranchedValue`| { ^gen object : R|ERROR CLASS: Symbol not found, for `BranchedValue`| {
private constructor(): R|ERROR CLASS: Symbol not found, for `BranchedValue`| { private constructor(): R|anonymous| {
super<R|ERROR CLASS: Symbol not found, for `BranchedValue`|>(R|<local>/argument|, Null(null), R|<local>/argument|.<Unresolved name: type>#, <Unresolved name: Opcodes>#.<Unresolved name: IFEQ>#) super<R|ERROR CLASS: Symbol not found, for `BranchedValue`|>(R|<local>/argument|, Null(null), R|<local>/argument|.<Unresolved name: type>#, <Unresolved name: Opcodes>#.<Unresolved name: IFEQ>#)
} }
@@ -1,7 +1,7 @@
FILE: localImplicitBodies.kt FILE: localImplicitBodies.kt
public final fun foo(): R|kotlin/Unit| { public final fun foo(): R|kotlin/Unit| {
lval x: R|anonymous| = object : R|kotlin/Any| { lval x: R|anonymous| = object : R|kotlin/Any| {
private constructor(): R|kotlin/Any| { private constructor(): R|anonymous| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
} }
@@ -3,7 +3,7 @@ FILE: localInnerClass.kt
} }
public final fun bar(): R|kotlin/Unit| { public final fun bar(): R|kotlin/Unit| {
object : R|Foo| { object : R|Foo| {
private constructor(): R|kotlin/Any| { private constructor(): R|anonymous| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
} }
@@ -21,7 +21,7 @@ FILE: localObjects.kt
public final fun test(): R|kotlin/Unit| { public final fun test(): R|kotlin/Unit| {
Q|A|.R|/A.x| Q|A|.R|/A.x|
lval b: R|anonymous| = object : R|Foo| { lval b: R|anonymous| = object : R|Foo| {
private constructor(): R|Foo| { private constructor(): R|anonymous| {
super<R|Foo|>() super<R|Foo|>()
} }
@@ -23,7 +23,7 @@ FILE: localScopes.kt
R|<local>/base|.R|/BaseLocal.baz|() R|<local>/base|.R|/BaseLocal.baz|()
R|<local>/base|.R|/Bar.foo|() R|<local>/base|.R|/Bar.foo|()
lval anonymous: R|anonymous| = object : R|Bar| { lval anonymous: R|anonymous| = object : R|Bar| {
private constructor(): R|Bar| { private constructor(): R|anonymous| {
super<R|Bar|>() super<R|Bar|>()
} }
@@ -1,7 +1,7 @@
FILE: foo.kt FILE: foo.kt
public final fun foo(): R|kotlin/Boolean| { public final fun foo(): R|kotlin/Boolean| {
object : R|Node<kotlin/Boolean>| { object : R|Node<kotlin/Boolean>| {
private constructor(): R|kotlin/Any| { private constructor(): R|anonymous| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
} }
@@ -32,7 +32,7 @@ FILE: O.kt
public final fun test(): R|kotlin/Unit| { public final fun test(): R|kotlin/Unit| {
lval x: R|kotlin/Int| = this@R|/O.Derived|.R|/O.Derived.bar| lval x: R|kotlin/Int| = this@R|/O.Derived|.R|/O.Derived.bar|
lval o: R|anonymous| = object : R|Wrapper| { lval o: R|anonymous| = object : R|Wrapper| {
private constructor(): R|Wrapper| { private constructor(): R|anonymous| {
super<R|Wrapper|>(this@R|/O.Derived.Some|.R|/O.Derived.Some.z|) super<R|Wrapper|>(this@R|/O.Derived.Some|.R|/O.Derived.Some.z|)
} }
@@ -41,7 +41,7 @@ FILE: O.kt
} }
public final val oo: R|anonymous| = object : R|kotlin/Any| { public final val oo: R|anonymous| = object : R|kotlin/Any| {
private constructor(): R|kotlin/Any| { private constructor(): R|anonymous| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
} }
@@ -61,7 +61,7 @@ FILE: O.kt
public final fun test(): R|kotlin/Unit| { public final fun test(): R|kotlin/Unit| {
lval x: R|kotlin/Int| = this@R|/O.Derived|.R|/O.Derived.bar| lval x: R|kotlin/Int| = this@R|/O.Derived|.R|/O.Derived.bar|
lval o: R|anonymous| = object : R|kotlin/Any| { lval o: R|anonymous| = object : R|kotlin/Any| {
private constructor(): R|kotlin/Any| { private constructor(): R|anonymous| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
} }
@@ -86,7 +86,7 @@ FILE: O.kt
private final fun gen(): R|kotlin/Any| { private final fun gen(): R|kotlin/Any| {
^gen object : R|Wrapper| { ^gen object : R|Wrapper| {
private constructor(): R|Wrapper| { private constructor(): R|anonymous| {
super<R|Wrapper|>(Boolean(true)) super<R|Wrapper|>(Boolean(true))
} }
@@ -5,7 +5,7 @@ FILE: privateObjectLiteral.kt
} }
private final val x: R|anonymous| = object : R|kotlin/Any| { private final val x: R|anonymous| = object : R|kotlin/Any| {
private constructor(): R|kotlin/Any| { private constructor(): R|anonymous| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
} }
@@ -21,7 +21,7 @@ FILE: privateObjectLiteral.kt
public get(): R|kotlin/Int| public get(): R|kotlin/Int|
internal final val z: R|anonymous| = object : R|kotlin/Any| { internal final val z: R|anonymous| = object : R|kotlin/Any| {
private constructor(): R|kotlin/Any| { private constructor(): R|anonymous| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
} }
+4 -4
View File
@@ -9,7 +9,7 @@ FILE: localObject.kt
public final fun tesLambda(x: R|kotlin/Int|): R|kotlin/Int| { public final fun tesLambda(x: R|kotlin/Int|): R|kotlin/Int| {
^tesLambda R|/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| { ^tesLambda R|/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| {
lval obj: R|anonymous| = object : R|Foo| { lval obj: R|anonymous| = object : R|Foo| {
private constructor(): R|kotlin/Any| { private constructor(): R|anonymous| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
} }
@@ -35,7 +35,7 @@ FILE: localObject.kt
public get(): R|kotlin/Int| public get(): R|kotlin/Int|
public set(value: R|kotlin/Int|): R|kotlin/Unit| { public set(value: R|kotlin/Int|): R|kotlin/Unit| {
lval obj: R|anonymous| = object : R|Foo| { lval obj: R|anonymous| = object : R|Foo| {
private constructor(): R|kotlin/Any| { private constructor(): R|anonymous| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
} }
@@ -51,7 +51,7 @@ FILE: localObject.kt
public final val y: R|kotlin/Int| public final val y: R|kotlin/Int|
public get(): R|kotlin/Int| { public get(): R|kotlin/Int| {
lval obj: R|anonymous| = object : R|Foo| { lval obj: R|anonymous| = object : R|Foo| {
private constructor(): R|kotlin/Any| { private constructor(): R|anonymous| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
} }
@@ -66,7 +66,7 @@ FILE: localObject.kt
public final val z: R|kotlin/Int| = this@R|/TestProperty|.R|kotlin/run|<R|TestProperty|, R|kotlin/Int|>(<L> = run@fun R|TestProperty|.<anonymous>(): R|kotlin/Int| <kind=EXACTLY_ONCE> { public final val z: R|kotlin/Int| = this@R|/TestProperty|.R|kotlin/run|<R|TestProperty|, R|kotlin/Int|>(<L> = run@fun R|TestProperty|.<anonymous>(): R|kotlin/Int| <kind=EXACTLY_ONCE> {
lval obj: R|anonymous| = object : R|Foo| { lval obj: R|anonymous| = object : R|Foo| {
private constructor(): R|kotlin/Any| { private constructor(): R|anonymous| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
} }
+3 -3
View File
@@ -1,6 +1,6 @@
FILE: objectInnerClass.kt FILE: objectInnerClass.kt
public final val case1: R|anonymous| = object : R|A| { public final val case1: R|anonymous| = object : R|A| {
private constructor(): R|kotlin/Any| { private constructor(): R|anonymous| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
} }
@@ -68,7 +68,7 @@ FILE: objectInnerClass.kt
} }
public final val x: R|anonymous| = object : R|Case2.Base| { public final val x: R|anonymous| = object : R|Case2.Base| {
private constructor(): R|Case2.Base| { private constructor(): R|anonymous| {
super<R|Case2.Base|>(R|/B.B|()) super<R|Case2.Base|>(R|/B.B|())
} }
@@ -125,7 +125,7 @@ FILE: objectInnerClass.kt
} }
public final val x: R|anonymous| = object : R|A| { public final val x: R|anonymous| = object : R|A| {
private constructor(): R|kotlin/Any| { private constructor(): R|anonymous| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
} }
@@ -5,7 +5,7 @@ FILE: anonymousInDelegate.kt
} }
public final val x: R|kotlin/Int|by R|kotlin/lazy|<R|kotlin/Int|>(<L> = lazy@fun <anonymous>(): R|kotlin/Int| { public final val x: R|kotlin/Int|by R|kotlin/lazy|<R|kotlin/Int|>(<L> = lazy@fun <anonymous>(): R|kotlin/Int| {
lval foo: R|anonymous| = object : R|Foo| { lval foo: R|anonymous| = object : R|Foo| {
private constructor(): R|kotlin/Any| { private constructor(): R|anonymous| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
} }
@@ -24,7 +24,7 @@ FILE: delegateWithAnonymousObject.kt
public final var issueListView: R|IssueListView|by this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(<L> = delegate@fun <anonymous>(): R|kotlin/properties/ReadWriteProperty<IssuesListUserProfile, IssueListView>| { public final var issueListView: R|IssueListView|by this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(<L> = delegate@fun <anonymous>(): R|kotlin/properties/ReadWriteProperty<IssuesListUserProfile, IssueListView>| {
^ object : R|kotlin/properties/ReadWriteProperty<IssuesListUserProfile, IssueListView>| { ^ object : R|kotlin/properties/ReadWriteProperty<IssuesListUserProfile, IssueListView>| {
private constructor(): R|kotlin/Any| { private constructor(): R|anonymous| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
} }
@@ -2,7 +2,7 @@ FILE: problems.kt
public final val sb: R|java/lang/StringBuilder| = R|java/lang/StringBuilder.StringBuilder|() public final val sb: R|java/lang/StringBuilder| = R|java/lang/StringBuilder.StringBuilder|()
public get(): R|java/lang/StringBuilder| public get(): R|java/lang/StringBuilder|
public final val o: R|anonymous| = object : R|kotlin/Any| { public final val o: R|anonymous| = object : R|kotlin/Any| {
private constructor(): R|kotlin/Any| { private constructor(): R|anonymous| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
} }
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
//WITH_RUNTIME //WITH_RUNTIME
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
public fun <T, R> myWith(receiver: T, block: T.() -> R): R { public fun <T, R> myWith(receiver: T, block: T.() -> R): R {
return receiver.block() return receiver.block()
} }
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
var result = "fail" var result = "fail"
public fun <T, R> myWith(receiver: T, block: T.() -> R): R { public fun <T, R> myWith(receiver: T, block: T.() -> R): R {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class Foo(val args: String){ open class Foo(val args: String){
constructor(arg: Any = 1) : this(arg.toString()) { constructor(arg: Any = 1) : this(arg.toString()) {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
abstract class O(val value: String) { abstract class O(val value: String) {
constructor(o: Char = 'O') : this("$o") constructor(o: Char = 'O') : this("$o")
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
import kotlin.properties.Delegates.notNull import kotlin.properties.Delegates.notNull
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KT-3581 // KT-3581
open class A(val result: String = "OK") { open class A(val result: String = "OK") {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A( class A(
val a: String = { val a: String = {
open class B() { open class B() {
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun box(): String { fun box(): String {
val k = object { val k = object {
val ok = "OK" val ok = "OK"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A { class A {
operator fun component1() = 1 operator fun component1() = 1
operator fun component2() = 2 operator fun component2() = 2
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A(val value: String) class A(val value: String)
fun A.test(): String { fun A.test(): String {
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
public object SomeObject { public object SomeObject {
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Clazz { class Clazz {
companion object { companion object {
val a = object { val a = object {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A { class A {
val z: String = "OK" val z: String = "OK"
} }
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
abstract class Your { abstract class Your {
abstract val your: String abstract val your: String
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
abstract class Your { abstract class Your {
abstract val your: String abstract val your: String
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
abstract class Your { abstract class Your {
abstract val your: String abstract val your: String
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
// WITH_REFLECT // WITH_REFLECT
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
// WITH_REFLECT // WITH_REFLECT
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
// WITH_RUNTIME // WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
// WITH_RUNTIME // WITH_RUNTIME
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
// WITH_RUNTIME // WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class LockFreeLinkedListNode(val s: String) open class LockFreeLinkedListNode(val s: String)
private class SendBuffered(s: String) : LockFreeLinkedListNode(s) private class SendBuffered(s: String) : LockFreeLinkedListNode(s)
open class AddLastDesc2<out T : LockFreeLinkedListNode>(val node: T) open class AddLastDesc2<out T : LockFreeLinkedListNode>(val node: T)
@@ -106,7 +106,7 @@ FILE fqName:<root> fileName:/delegatedImplementation.kt
BLOCK type=<root>.otherImpl.<no name provided> origin=OBJECT_LITERAL BLOCK type=<root>.otherImpl.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.IOther] CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.IOther]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.otherImpl.<no name provided> $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.otherImpl.<no name provided>
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary] CONSTRUCTOR visibility:private <> () returnType:<root>.otherImpl.<no name provided> [primary]
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any' DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.IOther]' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.IOther]'
@@ -58,7 +58,7 @@ FILE fqName:<root> fileName:/lambdaInDataClassDefaultParameter.kt
BLOCK type=<root>.B.<init>.<no name provided> origin=OBJECT_LITERAL BLOCK type=<root>.B.<init>.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any] CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.B.<init>.<no name provided> $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.B.<init>.<no name provided>
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary] CONSTRUCTOR visibility:private <> () returnType:<root>.B.<init>.<no name provided> [primary]
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any' DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]'
@@ -22,7 +22,7 @@ FILE fqName:<root> fileName:/objectLiteralExpressions.kt
BLOCK type=<root>.test1.<no name provided> origin=OBJECT_LITERAL BLOCK type=<root>.test1.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any] CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test1.<no name provided> $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test1.<no name provided>
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary] CONSTRUCTOR visibility:private <> () returnType:<root>.test1.<no name provided> [primary]
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any' DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]'
@@ -38,7 +38,7 @@ FILE fqName:<root> fileName:/objectLiteralExpressions.kt
BLOCK type=<root>.test2.<no name provided> origin=OBJECT_LITERAL BLOCK type=<root>.test2.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.IFoo] CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.IFoo]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test2.<no name provided> $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test2.<no name provided>
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary] CONSTRUCTOR visibility:private <> () returnType:<root>.test2.<no name provided> [primary]
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any' DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.IFoo]' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.IFoo]'
@@ -89,7 +89,7 @@ FILE fqName:<root> fileName:/objectLiteralExpressions.kt
BLOCK type=<root>.Outer.test3.<no name provided> origin=OBJECT_LITERAL BLOCK type=<root>.Outer.test3.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner] CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Outer.test3.<no name provided> $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Outer.test3.<no name provided>
CONSTRUCTOR visibility:private <> () returnType:<root>.Outer.Inner [primary] CONSTRUCTOR visibility:private <> () returnType:<root>.Outer.test3.<no name provided> [primary]
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Outer.Inner' DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Outer.Inner'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner]' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner]'
@@ -119,7 +119,7 @@ FILE fqName:<root> fileName:/objectLiteralExpressions.kt
BLOCK type=<root>.test4.<no name provided> origin=OBJECT_LITERAL BLOCK type=<root>.test4.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner] CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test4.<no name provided> $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test4.<no name provided>
CONSTRUCTOR visibility:private <> () returnType:<root>.Outer.Inner [primary] CONSTRUCTOR visibility:private <> () returnType:<root>.test4.<no name provided> [primary]
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Outer.Inner' DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Outer.Inner'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner]' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner]'
@@ -69,7 +69,7 @@ FILE fqName:<root> fileName:/enumEntryReferenceFromEnumEntryClass.kt
BLOCK type=<root>.MyEnum.Z.anObject.<no name provided> origin=OBJECT_LITERAL BLOCK type=<root>.MyEnum.Z.anObject.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any] CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MyEnum.Z.anObject.<no name provided> $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MyEnum.Z.anObject.<no name provided>
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary] CONSTRUCTOR visibility:private <> () returnType:<root>.MyEnum.Z.anObject.<no name provided> [primary]
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any' DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]'
@@ -61,7 +61,7 @@ FILE fqName:<root> fileName:/partialSam.kt
BLOCK type=<root>.fsi.<no name provided> origin=OBJECT_LITERAL BLOCK type=<root>.fsi.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Fn<kotlin.String, kotlin.Int>] CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Fn<kotlin.String, kotlin.Int>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.fsi.<no name provided> $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.fsi.<no name provided>
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary] CONSTRUCTOR visibility:private <> () returnType:<root>.fsi.<no name provided> [primary]
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any' DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Fn<kotlin.String, kotlin.Int>]' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Fn<kotlin.String, kotlin.Int>]'
@@ -85,7 +85,7 @@ FILE fqName:<root> fileName:/partialSam.kt
BLOCK type=<root>.fis.<no name provided> origin=OBJECT_LITERAL BLOCK type=<root>.fis.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Fn<kotlin.Int, kotlin.String>] CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Fn<kotlin.Int, kotlin.String>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.fis.<no name provided> $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.fis.<no name provided>
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary] CONSTRUCTOR visibility:private <> () returnType:<root>.fis.<no name provided> [primary]
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any' DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Fn<kotlin.Int, kotlin.String>]' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Fn<kotlin.Int, kotlin.String>]'
@@ -75,7 +75,7 @@ FILE fqName:<root> fileName:/multipleThisReferences.kt
BLOCK type=<root>.Host.test.<no name provided> origin=OBJECT_LITERAL BLOCK type=<root>.Host.test.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner] CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host.test.<no name provided> $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host.test.<no name provided>
CONSTRUCTOR visibility:private <> () returnType:<root>.Outer.Inner [primary] CONSTRUCTOR visibility:private <> () returnType:<root>.Host.test.<no name provided> [primary]
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.Int) [primary] declared in <root>.Outer.Inner' DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.Int) [primary] declared in <root>.Outer.Inner'
x: CONST Int type=kotlin.Int value=42 x: CONST Int type=kotlin.Int value=42
@@ -113,7 +113,7 @@ FILE fqName:<root> fileName:/objectReference.kt
BLOCK type=<root>.Z.anObject.<no name provided> origin=OBJECT_LITERAL BLOCK type=<root>.Z.anObject.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any] CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Z.anObject.<no name provided> $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Z.anObject.<no name provided>
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary] CONSTRUCTOR visibility:private <> () returnType:<root>.Z.anObject.<no name provided> [primary]
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any' DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]'
@@ -69,7 +69,7 @@ FILE fqName:<root> fileName:/thisOfGenericOuterClass.kt
BLOCK type=<root>.test.<no name provided> origin=OBJECT_LITERAL BLOCK type=<root>.test.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner<kotlin.Int>] CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner<kotlin.Int>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test.<no name provided> $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test.<no name provided>
CONSTRUCTOR visibility:private <> () returnType:<root>.Outer.Inner<kotlin.Int> [primary] CONSTRUCTOR visibility:private <> () returnType:<root>.test.<no name provided> [primary]
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (y: kotlin.Int) [primary] declared in <root>.Outer.Inner' DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (y: kotlin.Int) [primary] declared in <root>.Outer.Inner'
y: CONST Int type=kotlin.Int value=42 y: CONST Int type=kotlin.Int value=42
@@ -6,16 +6,16 @@ FILE fqName:<root> fileName:/thisReferenceBeforeClassDeclared.kt
BLOCK type=<root>.test.<no name provided> origin=OBJECT_LITERAL BLOCK type=<root>.test.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.WithCompanion] CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.WithCompanion]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test.<no name provided> $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test.<no name provided>
CONSTRUCTOR visibility:private <> () returnType:<root>.WithCompanion [primary] CONSTRUCTOR visibility:private <> () returnType:<root>.test.<no name provided> [primary]
BLOCK_BODY BLOCK_BODY
ERROR_CALL 'Cannot find delegated constructor call' type=<root>.WithCompanion ERROR_CALL 'Cannot find delegated constructor call' type=<root>.test.<no name provided>
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.WithCompanion]' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.WithCompanion]'
CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.test.<no name provided>' type=<root>.test.<no name provided> origin=null CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.test.<no name provided>' type=<root>.test.<no name provided> origin=null
VAR name:test2 type:<root>.test.<no name provided> [val] VAR name:test2 type:<root>.test.<no name provided> [val]
BLOCK type=<root>.test.<no name provided> origin=OBJECT_LITERAL BLOCK type=<root>.test.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.WithCompanion] CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.WithCompanion]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test.<no name provided> $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test.<no name provided>
CONSTRUCTOR visibility:private <> () returnType:<root>.WithCompanion [primary] CONSTRUCTOR visibility:private <> () returnType:<root>.test.<no name provided> [primary]
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (a: <root>.WithCompanion.Companion) [primary] declared in <root>.WithCompanion' DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (a: <root>.WithCompanion.Companion) [primary] declared in <root>.WithCompanion'
a: ERROR_CALL 'Unresolved reference: <Unresolved name: foo>#' type=IrErrorType a: ERROR_CALL 'Unresolved reference: <Unresolved name: foo>#' type=IrErrorType