Generate explicit call to 'Any()' if no superclass found.

Generate call super-constructor calls as IrDelegatedConstructorCall.
This commit is contained in:
Dmitry Petrov
2016-09-05 09:20:09 +03:00
committed by Dmitry Petrov
parent 535ddd639f
commit 28b3ea27f3
41 changed files with 156 additions and 30 deletions
@@ -24,6 +24,7 @@ import org.jetbrains.kotlin.psi.*
import org.jetbrains.kotlin.psi.psiUtil.endOffset import org.jetbrains.kotlin.psi.psiUtil.endOffset
import org.jetbrains.kotlin.psi.psiUtil.startOffset import org.jetbrains.kotlin.psi.psiUtil.startOffset
import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.kotlin.resolve.BindingContext
import org.jetbrains.kotlin.resolve.descriptorUtil.getSuperClassOrAny
import java.lang.AssertionError import java.lang.AssertionError
import java.util.* import java.util.*
@@ -177,16 +178,27 @@ class BodyGenerator(val scopeOwner: DeclarationDescriptor, override val context:
irBlockBody.addStatement(generateEnumEntrySuperConstructorCall(ktClassOrObject as KtEnumEntry, classDescriptor)) irBlockBody.addStatement(generateEnumEntrySuperConstructorCall(ktClassOrObject as KtEnumEntry, classDescriptor))
} }
else -> { else -> {
val ktSuperTypeList = ktClassOrObject.getSuperTypeList() ?: return val statementGenerator = createStatementGenerator()
for (ktSuperTypeListEntry in ktSuperTypeList.entries) {
if (ktSuperTypeListEntry is KtSuperTypeCallEntry) { ktClassOrObject.getSuperTypeList()?.let { ktSuperTypeList ->
val statementGenerator = createStatementGenerator() for (ktSuperTypeListEntry in ktSuperTypeList.entries) {
val superConstructorCall = statementGenerator.pregenerateCall(getResolvedCall(ktSuperTypeListEntry)!!) if (ktSuperTypeListEntry is KtSuperTypeCallEntry) {
val irSuperConstructorCall = CallGenerator(statementGenerator).generateCall( val superConstructorCall = statementGenerator.pregenerateCall(getResolvedCall(ktSuperTypeListEntry)!!)
ktSuperTypeListEntry, superConstructorCall, IrOperator.SUPER_CONSTRUCTOR_CALL) val irSuperConstructorCall = CallGenerator(statementGenerator).generateDelegatingConstructorCall(
irBlockBody.addStatement(irSuperConstructorCall) ktSuperTypeListEntry.startOffset, ktSuperTypeListEntry.endOffset, superConstructorCall)
irBlockBody.addStatement(irSuperConstructorCall)
return
}
} }
} }
// If we are here, we didn't find a superclass entry in super types.
// Thus, super class should be Any.
val superClass = classDescriptor.getSuperClassOrAny()
assert(KotlinBuiltIns.isAny(superClass)) { "$classDescriptor: Super class should be any: $superClass" }
val superConstructor = superClass.constructors.single()
irBlockBody.addStatement(IrDelegatingConstructorCallImpl(ktClassOrObject.startOffset, ktClassOrObject.endOffset,
superConstructor))
} }
} }
} }
@@ -18,7 +18,6 @@ package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.descriptors.ConstructorDescriptor import org.jetbrains.kotlin.descriptors.ConstructorDescriptor
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.resolve.descriptorUtil.builtIns
interface IrDelegatingConstructorCall : IrGeneralCall { interface IrDelegatingConstructorCall : IrGeneralCall {
override val descriptor: ConstructorDescriptor override val descriptor: ConstructorDescriptor
@@ -28,7 +27,7 @@ class IrDelegatingConstructorCallImpl(
startOffset: Int, startOffset: Int,
endOffset: Int, endOffset: Int,
override val descriptor: ConstructorDescriptor override val descriptor: ConstructorDescriptor
) : IrGeneralCallBase(startOffset, endOffset, descriptor.builtIns.unitType, descriptor.valueParameters.size), IrDelegatingConstructorCall { ) : IrGeneralCallBase(startOffset, endOffset, descriptor.returnType, descriptor.valueParameters.size), IrDelegatingConstructorCall {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R { override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R {
return visitor.visitDelegatingConstructorCall(this, data) return visitor.visitDelegatingConstructorCall(this, data)
} }
@@ -89,7 +89,6 @@ interface IrOperator {
object ANONYMOUS_FUNCTION : IrOperatorImpl("ANONYMOUS_FUNCTION") object ANONYMOUS_FUNCTION : IrOperatorImpl("ANONYMOUS_FUNCTION")
object OBJECT_LITERAL : IrOperatorImpl("OBJECT_LITERAL") object OBJECT_LITERAL : IrOperatorImpl("OBJECT_LITERAL")
object SUPER_CONSTRUCTOR_CALL : IrOperatorImpl("SUPER_CONSTRUCTOR_CALL")
object INITIALIZE_PROPERTY_FROM_PARAMETER : IrOperatorImpl("INITIALIZE_PROPERTY_FROM_PARAMETER") object INITIALIZE_PROPERTY_FROM_PARAMETER : IrOperatorImpl("INITIALIZE_PROPERTY_FROM_PARAMETER")
object PROPERTY_REFERENCE_FOR_DELEGATE : IrOperatorImpl("PROPERTY_REFERENCE_FOR_DELEGATE") object PROPERTY_REFERENCE_FOR_DELEGATE : IrOperatorImpl("PROPERTY_REFERENCE_FOR_DELEGATE")
@@ -2,6 +2,7 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt
CLASS CLASS Base CLASS CLASS Base
CONSTRUCTOR public constructor Base(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int) CONSTRUCTOR public constructor Base(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
SET_BACKING_FIELD x type=kotlin.Unit operator=null SET_BACKING_FIELD x type=kotlin.Unit operator=null
GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
SET_BACKING_FIELD y type=kotlin.Unit operator=null SET_BACKING_FIELD y type=kotlin.Unit operator=null
@@ -21,7 +22,7 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt
GET_VAR yy type=kotlin.Int operator=null GET_VAR yy type=kotlin.Int operator=null
VAR val tmp1_x: kotlin.Int VAR val tmp1_x: kotlin.Int
GET_VAR xx type=kotlin.Int operator=null GET_VAR xx type=kotlin.Int operator=null
CALL .<init> type=Base operator=SUPER_CONSTRUCTOR_CALL DELEGATING_CONSTRUCTOR_CALL Base
x: GET_VAR tmp1_x type=kotlin.Int operator=null x: GET_VAR tmp1_x type=kotlin.Int operator=null
y: GET_VAR tmp0_y type=kotlin.Int operator=null y: GET_VAR tmp0_y type=kotlin.Int operator=null
INSTANCE_INITIALIZER_CALL classDescriptor=Test1 INSTANCE_INITIALIZER_CALL classDescriptor=Test1
@@ -33,10 +34,9 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt
GET_VAR yy type=kotlin.Int operator=null GET_VAR yy type=kotlin.Int operator=null
VAR val tmp1_x: kotlin.Int VAR val tmp1_x: kotlin.Int
GET_VAR xx type=kotlin.Int operator=null GET_VAR xx type=kotlin.Int operator=null
TYPE_OP operator=IMPLICIT_CAST typeOperand=Base DELEGATING_CONSTRUCTOR_CALL Base
DELEGATING_CONSTRUCTOR_CALL Base x: GET_VAR tmp1_x type=kotlin.Int operator=null
x: GET_VAR tmp1_x type=kotlin.Int operator=null y: GET_VAR tmp0_y type=kotlin.Int operator=null
y: GET_VAR tmp0_y type=kotlin.Int operator=null
INSTANCE_INITIALIZER_CALL classDescriptor=Test2 INSTANCE_INITIALIZER_CALL classDescriptor=Test2
CONSTRUCTOR public constructor Test2(/*0*/ xxx: kotlin.Int, /*1*/ yyy: kotlin.Int, /*2*/ a: kotlin.Any) CONSTRUCTOR public constructor Test2(/*0*/ xxx: kotlin.Int, /*1*/ yyy: kotlin.Int, /*2*/ a: kotlin.Any)
BLOCK_BODY BLOCK_BODY
@@ -45,7 +45,6 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt
GET_VAR yyy type=kotlin.Int operator=null GET_VAR yyy type=kotlin.Int operator=null
VAR val tmp1_xx: kotlin.Int VAR val tmp1_xx: kotlin.Int
GET_VAR xxx type=kotlin.Int operator=null GET_VAR xxx type=kotlin.Int operator=null
TYPE_OP operator=IMPLICIT_CAST typeOperand=Test2 DELEGATING_CONSTRUCTOR_CALL Test2
DELEGATING_CONSTRUCTOR_CALL Test2 xx: GET_VAR tmp1_xx type=kotlin.Int operator=null
xx: GET_VAR tmp1_xx type=kotlin.Int operator=null yy: GET_VAR tmp0_yy type=kotlin.Int operator=null
yy: GET_VAR tmp0_yy type=kotlin.Int operator=null
+3
View File
@@ -4,6 +4,7 @@ FILE /classMembers.kt
z: EXPRESSION_BODY z: EXPRESSION_BODY
CONST Int type=kotlin.Int value='1' CONST Int type=kotlin.Int value='1'
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
SET_BACKING_FIELD y type=kotlin.Unit operator=null SET_BACKING_FIELD y type=kotlin.Unit operator=null
GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
SET_BACKING_FIELD z type=kotlin.Unit operator=null SET_BACKING_FIELD z type=kotlin.Unit operator=null
@@ -51,6 +52,7 @@ FILE /classMembers.kt
CLASS CLASS NestedClass CLASS CLASS NestedClass
CONSTRUCTOR public constructor NestedClass() CONSTRUCTOR public constructor NestedClass()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=NestedClass INSTANCE_INITIALIZER_CALL classDescriptor=NestedClass
FUN public final fun function(): kotlin.Unit FUN public final fun function(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
@@ -70,4 +72,5 @@ FILE /classMembers.kt
CLASS OBJECT Companion CLASS OBJECT Companion
CONSTRUCTOR private constructor Companion() CONSTRUCTOR private constructor Companion()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Companion INSTANCE_INITIALIZER_CALL classDescriptor=Companion
+3
View File
@@ -2,15 +2,18 @@ FILE /classes.kt
CLASS CLASS TestClass CLASS CLASS TestClass
CONSTRUCTOR public constructor TestClass() CONSTRUCTOR public constructor TestClass()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=TestClass INSTANCE_INITIALIZER_CALL classDescriptor=TestClass
CLASS INTERFACE TestInterface CLASS INTERFACE TestInterface
CLASS OBJECT TestObject CLASS OBJECT TestObject
CONSTRUCTOR private constructor TestObject() CONSTRUCTOR private constructor TestObject()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=TestObject INSTANCE_INITIALIZER_CALL classDescriptor=TestObject
CLASS ANNOTATION_CLASS TestAnnotationClass CLASS ANNOTATION_CLASS TestAnnotationClass
CONSTRUCTOR public constructor TestAnnotationClass() CONSTRUCTOR public constructor TestAnnotationClass()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=TestAnnotationClass INSTANCE_INITIALIZER_CALL classDescriptor=TestAnnotationClass
CLASS ENUM_CLASS TestEnumClass CLASS ENUM_CLASS TestEnumClass
CONSTRUCTOR private constructor TestEnumClass() CONSTRUCTOR private constructor TestEnumClass()
@@ -2,16 +2,20 @@ FILE /companionObject.kt
CLASS CLASS Test1 CLASS CLASS Test1
CONSTRUCTOR public constructor Test1() CONSTRUCTOR public constructor Test1()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Test1 INSTANCE_INITIALIZER_CALL classDescriptor=Test1
CLASS OBJECT Companion CLASS OBJECT Companion
CONSTRUCTOR private constructor Companion() CONSTRUCTOR private constructor Companion()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Companion INSTANCE_INITIALIZER_CALL classDescriptor=Companion
CLASS CLASS Test2 CLASS CLASS Test2
CONSTRUCTOR public constructor Test2() CONSTRUCTOR public constructor Test2()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Test2 INSTANCE_INITIALIZER_CALL classDescriptor=Test2
CLASS OBJECT Named CLASS OBJECT Named
CONSTRUCTOR private constructor Named() CONSTRUCTOR private constructor Named()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Named INSTANCE_INITIALIZER_CALL classDescriptor=Named
+1
View File
@@ -2,6 +2,7 @@ FILE /dataClasses.kt
CLASS CLASS Test1 CLASS CLASS Test1
CONSTRUCTOR public constructor Test1(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.String, /*2*/ z: kotlin.Any) CONSTRUCTOR public constructor Test1(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.String, /*2*/ z: kotlin.Any)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
SET_BACKING_FIELD x type=kotlin.Unit operator=null SET_BACKING_FIELD x type=kotlin.Unit operator=null
GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
SET_BACKING_FIELD y type=kotlin.Unit operator=null SET_BACKING_FIELD y type=kotlin.Unit operator=null
@@ -6,6 +6,7 @@ FILE /delegatedImplementation.kt
CLASS OBJECT BaseImpl CLASS OBJECT BaseImpl
CONSTRUCTOR private constructor BaseImpl() CONSTRUCTOR private constructor BaseImpl()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=BaseImpl INSTANCE_INITIALIZER_CALL classDescriptor=BaseImpl
FUN public open override /*1*/ fun foo(/*0*/ x: kotlin.Int, /*1*/ s: kotlin.String): kotlin.Unit FUN public open override /*1*/ fun foo(/*0*/ x: kotlin.Int, /*1*/ s: kotlin.String): kotlin.Unit
BLOCK_BODY BLOCK_BODY
@@ -27,6 +28,7 @@ FILE /delegatedImplementation.kt
CLASS CLASS <no name provided> CLASS CLASS <no name provided>
CONSTRUCTOR public constructor <no name provided>() CONSTRUCTOR public constructor <no name provided>()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=<no name provided> INSTANCE_INITIALIZER_CALL classDescriptor=<no name provided>
PROPERTY public open override /*1*/ val x: kotlin.String PROPERTY public open override /*1*/ val x: kotlin.String
EXPRESSION_BODY EXPRESSION_BODY
@@ -50,6 +52,7 @@ FILE /delegatedImplementation.kt
CLASS CLASS Test1 CLASS CLASS Test1
CONSTRUCTOR public constructor Test1() CONSTRUCTOR public constructor Test1()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Test1 INSTANCE_INITIALIZER_CALL classDescriptor=Test1
PROPERTY val `Test1$IBase$delegate`: BaseImpl PROPERTY val `Test1$IBase$delegate`: BaseImpl
EXPRESSION_BODY EXPRESSION_BODY
@@ -73,6 +76,7 @@ FILE /delegatedImplementation.kt
CLASS CLASS Test2 CLASS CLASS Test2
CONSTRUCTOR public constructor Test2() CONSTRUCTOR public constructor Test2()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Test2 INSTANCE_INITIALIZER_CALL classDescriptor=Test2
PROPERTY val `Test2$IBase$delegate`: BaseImpl PROPERTY val `Test2$IBase$delegate`: BaseImpl
EXPRESSION_BODY EXPRESSION_BODY
@@ -5,6 +5,7 @@ FILE /delegatedImplementationWithExplicitOverride.kt
CLASS OBJECT FooBarImpl CLASS OBJECT FooBarImpl
CONSTRUCTOR private constructor FooBarImpl() CONSTRUCTOR private constructor FooBarImpl()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=FooBarImpl INSTANCE_INITIALIZER_CALL classDescriptor=FooBarImpl
FUN public open override /*1*/ fun foo(): kotlin.Unit FUN public open override /*1*/ fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
@@ -13,6 +14,7 @@ FILE /delegatedImplementationWithExplicitOverride.kt
CLASS CLASS C CLASS CLASS C
CONSTRUCTOR public constructor C() CONSTRUCTOR public constructor C()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=C INSTANCE_INITIALIZER_CALL classDescriptor=C
PROPERTY val `C$IFooBar$delegate`: FooBarImpl PROPERTY val `C$IFooBar$delegate`: FooBarImpl
EXPRESSION_BODY EXPRESSION_BODY
@@ -2,6 +2,7 @@ FILE /delegatingConstructorCallsInSecondaryConstructors.kt
CLASS CLASS Base CLASS CLASS Base
CONSTRUCTOR public constructor Base() CONSTRUCTOR public constructor Base()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Base INSTANCE_INITIALIZER_CALL classDescriptor=Base
CLASS CLASS Test CLASS CLASS Test
CONSTRUCTOR public constructor Test() CONSTRUCTOR public constructor Test()
+12
View File
@@ -28,4 +28,16 @@ class Test4 {
init { init {
println("2") println("2")
} }
}
class Test5 {
init {
println("1")
}
inner class TestInner {
init {
println("2")
}
}
} }
+20
View File
@@ -2,6 +2,7 @@ FILE /initBlock.kt
CLASS CLASS Test1 CLASS CLASS Test1
CONSTRUCTOR public constructor Test1() CONSTRUCTOR public constructor Test1()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Test1 INSTANCE_INITIALIZER_CALL classDescriptor=Test1
ANONYMOUS_INITIALIZER Test1 ANONYMOUS_INITIALIZER Test1
BLOCK_BODY BLOCK_BODY
@@ -9,6 +10,7 @@ FILE /initBlock.kt
CLASS CLASS Test2 CLASS CLASS Test2
CONSTRUCTOR public constructor Test2(/*0*/ x: kotlin.Int) CONSTRUCTOR public constructor Test2(/*0*/ x: kotlin.Int)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
SET_BACKING_FIELD x type=kotlin.Unit operator=null SET_BACKING_FIELD x type=kotlin.Unit operator=null
GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
INSTANCE_INITIALIZER_CALL classDescriptor=Test2 INSTANCE_INITIALIZER_CALL classDescriptor=Test2
@@ -39,3 +41,21 @@ FILE /initBlock.kt
BLOCK_BODY BLOCK_BODY
CALL .println type=kotlin.Unit operator=null CALL .println type=kotlin.Unit operator=null
message: CONST String type=kotlin.String value='2' message: CONST String type=kotlin.String value='2'
CLASS CLASS Test5
CONSTRUCTOR public constructor Test5()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Test5
ANONYMOUS_INITIALIZER Test5
BLOCK_BODY
CALL .println type=kotlin.Unit operator=null
message: CONST String type=kotlin.String value='1'
CLASS CLASS TestInner
CONSTRUCTOR public constructor TestInner()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=TestInner
ANONYMOUS_INITIALIZER TestInner
BLOCK_BODY
CALL .println type=kotlin.Unit operator=null
message: CONST String type=kotlin.String value='2'
+3
View File
@@ -2,6 +2,7 @@ FILE /initVal.kt
CLASS CLASS TestInitValFromParameter CLASS CLASS TestInitValFromParameter
CONSTRUCTOR public constructor TestInitValFromParameter(/*0*/ x: kotlin.Int) CONSTRUCTOR public constructor TestInitValFromParameter(/*0*/ x: kotlin.Int)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
SET_BACKING_FIELD x type=kotlin.Unit operator=null SET_BACKING_FIELD x type=kotlin.Unit operator=null
GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
INSTANCE_INITIALIZER_CALL classDescriptor=TestInitValFromParameter INSTANCE_INITIALIZER_CALL classDescriptor=TestInitValFromParameter
@@ -11,6 +12,7 @@ FILE /initVal.kt
CLASS CLASS TestInitValInClass CLASS CLASS TestInitValInClass
CONSTRUCTOR public constructor TestInitValInClass() CONSTRUCTOR public constructor TestInitValInClass()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=TestInitValInClass INSTANCE_INITIALIZER_CALL classDescriptor=TestInitValInClass
PROPERTY public final val x: kotlin.Int = 0 PROPERTY public final val x: kotlin.Int = 0
EXPRESSION_BODY EXPRESSION_BODY
@@ -18,6 +20,7 @@ FILE /initVal.kt
CLASS CLASS TestInitValInInitBlock CLASS CLASS TestInitValInInitBlock
CONSTRUCTOR public constructor TestInitValInInitBlock() CONSTRUCTOR public constructor TestInitValInInitBlock()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=TestInitValInInitBlock INSTANCE_INITIALIZER_CALL classDescriptor=TestInitValInInitBlock
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
ANONYMOUS_INITIALIZER TestInitValInInitBlock ANONYMOUS_INITIALIZER TestInitValInInitBlock
+4
View File
@@ -2,6 +2,7 @@ FILE /initVar.kt
CLASS CLASS TestInitVarFromParameter CLASS CLASS TestInitVarFromParameter
CONSTRUCTOR public constructor TestInitVarFromParameter(/*0*/ x: kotlin.Int) CONSTRUCTOR public constructor TestInitVarFromParameter(/*0*/ x: kotlin.Int)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
SET_BACKING_FIELD x type=kotlin.Unit operator=null SET_BACKING_FIELD x type=kotlin.Unit operator=null
GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarFromParameter INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarFromParameter
@@ -11,6 +12,7 @@ FILE /initVar.kt
CLASS CLASS TestInitVarInClass CLASS CLASS TestInitVarInClass
CONSTRUCTOR public constructor TestInitVarInClass() CONSTRUCTOR public constructor TestInitVarInClass()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarInClass INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarInClass
PROPERTY public final var x: kotlin.Int PROPERTY public final var x: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
@@ -18,6 +20,7 @@ FILE /initVar.kt
CLASS CLASS TestInitVarInInitBlock CLASS CLASS TestInitVarInInitBlock
CONSTRUCTOR public constructor TestInitVarInInitBlock() CONSTRUCTOR public constructor TestInitVarInInitBlock()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarInInitBlock INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarInInitBlock
PROPERTY public final var x: kotlin.Int PROPERTY public final var x: kotlin.Int
ANONYMOUS_INITIALIZER TestInitVarInInitBlock ANONYMOUS_INITIALIZER TestInitVarInInitBlock
@@ -28,6 +31,7 @@ FILE /initVar.kt
CLASS CLASS TestInitVarWithCustomSetter CLASS CLASS TestInitVarWithCustomSetter
CONSTRUCTOR public constructor TestInitVarWithCustomSetter() CONSTRUCTOR public constructor TestInitVarWithCustomSetter()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarWithCustomSetter INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarWithCustomSetter
PROPERTY public final var x: kotlin.Int PROPERTY public final var x: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
+5
View File
@@ -0,0 +1,5 @@
class Outer {
open inner class TestInnerClass
inner class DerivedInnerClass : TestInnerClass()
}
+17
View File
@@ -0,0 +1,17 @@
FILE /innerClass.kt
CLASS CLASS Outer
CONSTRUCTOR public constructor Outer()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Outer
CLASS CLASS TestInnerClass
CONSTRUCTOR public constructor TestInnerClass()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=TestInnerClass
CLASS CLASS DerivedInnerClass
CONSTRUCTOR public constructor DerivedInnerClass()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL TestInnerClass
$this: THIS public final class Outer type=Outer
INSTANCE_INITIALIZER_CALL classDescriptor=DerivedInnerClass
+1
View File
@@ -4,6 +4,7 @@ FILE /localClasses.kt
CLASS CLASS LocalClass CLASS CLASS LocalClass
CONSTRUCTOR public constructor LocalClass() CONSTRUCTOR public constructor LocalClass()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=LocalClass INSTANCE_INITIALIZER_CALL classDescriptor=LocalClass
FUN public final fun foo(): kotlin.Unit FUN public final fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
@@ -7,6 +7,7 @@ FILE /objectLiteralExpressions.kt
CLASS CLASS <no name provided> CLASS CLASS <no name provided>
CONSTRUCTOR public constructor <no name provided>() CONSTRUCTOR public constructor <no name provided>()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=<no name provided> INSTANCE_INITIALIZER_CALL classDescriptor=<no name provided>
CALL .<init> type=test1.<no name provided> operator=OBJECT_LITERAL CALL .<init> type=test1.<no name provided> operator=OBJECT_LITERAL
PROPERTY public val test2: IFoo PROPERTY public val test2: IFoo
@@ -15,6 +16,7 @@ FILE /objectLiteralExpressions.kt
CLASS CLASS <no name provided> CLASS CLASS <no name provided>
CONSTRUCTOR public constructor <no name provided>() CONSTRUCTOR public constructor <no name provided>()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=<no name provided> INSTANCE_INITIALIZER_CALL classDescriptor=<no name provided>
FUN public open override /*1*/ fun foo(): kotlin.Unit FUN public open override /*1*/ fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
@@ -24,10 +26,12 @@ FILE /objectLiteralExpressions.kt
CLASS CLASS Outer CLASS CLASS Outer
CONSTRUCTOR public constructor Outer() CONSTRUCTOR public constructor Outer()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Outer INSTANCE_INITIALIZER_CALL classDescriptor=Outer
CLASS CLASS Inner CLASS CLASS Inner
CONSTRUCTOR public constructor Inner() CONSTRUCTOR public constructor Inner()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Inner INSTANCE_INITIALIZER_CALL classDescriptor=Inner
FUN public final fun test3(): Outer.Inner FUN public final fun test3(): Outer.Inner
BLOCK_BODY BLOCK_BODY
@@ -36,7 +40,7 @@ FILE /objectLiteralExpressions.kt
CLASS CLASS <no name provided> CLASS CLASS <no name provided>
CONSTRUCTOR public constructor <no name provided>() CONSTRUCTOR public constructor <no name provided>()
BLOCK_BODY BLOCK_BODY
CALL .<init> type=Outer.Inner operator=SUPER_CONSTRUCTOR_CALL DELEGATING_CONSTRUCTOR_CALL Inner
$this: THIS public final class Outer type=Outer $this: THIS public final class Outer type=Outer
INSTANCE_INITIALIZER_CALL classDescriptor=<no name provided> INSTANCE_INITIALIZER_CALL classDescriptor=<no name provided>
FUN public open override /*1*/ fun foo(): kotlin.Unit FUN public open override /*1*/ fun foo(): kotlin.Unit
@@ -51,7 +55,7 @@ FILE /objectLiteralExpressions.kt
CLASS CLASS <no name provided> CLASS CLASS <no name provided>
CONSTRUCTOR public constructor <no name provided>() CONSTRUCTOR public constructor <no name provided>()
BLOCK_BODY BLOCK_BODY
CALL .<init> type=Outer.Inner operator=SUPER_CONSTRUCTOR_CALL DELEGATING_CONSTRUCTOR_CALL Inner
$this: $RECEIVER of: test4 type=Outer $this: $RECEIVER of: test4 type=Outer
INSTANCE_INITIALIZER_CALL classDescriptor=<no name provided> INSTANCE_INITIALIZER_CALL classDescriptor=<no name provided>
FUN public open override /*1*/ fun foo(): kotlin.Unit FUN public open override /*1*/ fun foo(): kotlin.Unit
@@ -2,11 +2,12 @@ FILE /objectWithInitializers.kt
CLASS CLASS Base CLASS CLASS Base
CONSTRUCTOR public constructor Base() CONSTRUCTOR public constructor Base()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Base INSTANCE_INITIALIZER_CALL classDescriptor=Base
CLASS OBJECT Test CLASS OBJECT Test
CONSTRUCTOR private constructor Test() CONSTRUCTOR private constructor Test()
BLOCK_BODY BLOCK_BODY
CALL .<init> type=Base operator=SUPER_CONSTRUCTOR_CALL DELEGATING_CONSTRUCTOR_CALL Base
INSTANCE_INITIALIZER_CALL classDescriptor=Test INSTANCE_INITIALIZER_CALL classDescriptor=Test
PROPERTY public final val x: kotlin.Int = 1 PROPERTY public final val x: kotlin.Int = 1
EXPRESSION_BODY EXPRESSION_BODY
@@ -2,6 +2,7 @@ FILE /primaryConstructor.kt
CLASS CLASS Test1 CLASS CLASS Test1
CONSTRUCTOR public constructor Test1(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int) CONSTRUCTOR public constructor Test1(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
SET_BACKING_FIELD x type=kotlin.Unit operator=null SET_BACKING_FIELD x type=kotlin.Unit operator=null
GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
SET_BACKING_FIELD y type=kotlin.Unit operator=null SET_BACKING_FIELD y type=kotlin.Unit operator=null
@@ -16,6 +17,7 @@ FILE /primaryConstructor.kt
CLASS CLASS Test2 CLASS CLASS Test2
CONSTRUCTOR public constructor Test2(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int) CONSTRUCTOR public constructor Test2(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
SET_BACKING_FIELD y type=kotlin.Unit operator=null SET_BACKING_FIELD y type=kotlin.Unit operator=null
GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
INSTANCE_INITIALIZER_CALL classDescriptor=Test2 INSTANCE_INITIALIZER_CALL classDescriptor=Test2
@@ -28,6 +30,7 @@ FILE /primaryConstructor.kt
CLASS CLASS Test3 CLASS CLASS Test3
CONSTRUCTOR public constructor Test3(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int) CONSTRUCTOR public constructor Test3(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
SET_BACKING_FIELD y type=kotlin.Unit operator=null SET_BACKING_FIELD y type=kotlin.Unit operator=null
GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
INSTANCE_INITIALIZER_CALL classDescriptor=Test3 INSTANCE_INITIALIZER_CALL classDescriptor=Test3
@@ -2,21 +2,22 @@ FILE /primaryConstructorWithSuperConstructorCall.kt
CLASS CLASS Base CLASS CLASS Base
CONSTRUCTOR public constructor Base() CONSTRUCTOR public constructor Base()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Base INSTANCE_INITIALIZER_CALL classDescriptor=Base
CLASS CLASS TestImplicitPrimaryConstructor CLASS CLASS TestImplicitPrimaryConstructor
CONSTRUCTOR public constructor TestImplicitPrimaryConstructor() CONSTRUCTOR public constructor TestImplicitPrimaryConstructor()
BLOCK_BODY BLOCK_BODY
CALL .<init> type=Base operator=SUPER_CONSTRUCTOR_CALL DELEGATING_CONSTRUCTOR_CALL Base
INSTANCE_INITIALIZER_CALL classDescriptor=TestImplicitPrimaryConstructor INSTANCE_INITIALIZER_CALL classDescriptor=TestImplicitPrimaryConstructor
CLASS CLASS TestExplicitPrimaryConstructor CLASS CLASS TestExplicitPrimaryConstructor
CONSTRUCTOR public constructor TestExplicitPrimaryConstructor() CONSTRUCTOR public constructor TestExplicitPrimaryConstructor()
BLOCK_BODY BLOCK_BODY
CALL .<init> type=Base operator=SUPER_CONSTRUCTOR_CALL DELEGATING_CONSTRUCTOR_CALL Base
INSTANCE_INITIALIZER_CALL classDescriptor=TestExplicitPrimaryConstructor INSTANCE_INITIALIZER_CALL classDescriptor=TestExplicitPrimaryConstructor
CLASS CLASS TestWithDelegatingConstructor CLASS CLASS TestWithDelegatingConstructor
CONSTRUCTOR public constructor TestWithDelegatingConstructor(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int) CONSTRUCTOR public constructor TestWithDelegatingConstructor(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int)
BLOCK_BODY BLOCK_BODY
CALL .<init> type=Base operator=SUPER_CONSTRUCTOR_CALL DELEGATING_CONSTRUCTOR_CALL Base
SET_BACKING_FIELD x type=kotlin.Unit operator=null SET_BACKING_FIELD x type=kotlin.Unit operator=null
GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
SET_BACKING_FIELD y type=kotlin.Unit operator=null SET_BACKING_FIELD y type=kotlin.Unit operator=null
@@ -18,6 +18,7 @@ FILE /qualifiedSuperCalls.kt
CLASS CLASS CBoth CLASS CLASS CBoth
CONSTRUCTOR public constructor CBoth() CONSTRUCTOR public constructor CBoth()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=CBoth INSTANCE_INITIALIZER_CALL classDescriptor=CBoth
FUN public open override /*2*/ fun foo(): kotlin.Unit FUN public open override /*2*/ fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
+4 -3
View File
@@ -2,11 +2,12 @@ FILE /sealedClasses.kt
CLASS CLASS Expr CLASS CLASS Expr
CONSTRUCTOR private constructor Expr() CONSTRUCTOR private constructor Expr()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Expr INSTANCE_INITIALIZER_CALL classDescriptor=Expr
CLASS CLASS Const CLASS CLASS Const
CONSTRUCTOR public constructor Const(/*0*/ number: kotlin.Double) CONSTRUCTOR public constructor Const(/*0*/ number: kotlin.Double)
BLOCK_BODY BLOCK_BODY
CALL .<init> type=Expr operator=SUPER_CONSTRUCTOR_CALL DELEGATING_CONSTRUCTOR_CALL Expr
SET_BACKING_FIELD number type=kotlin.Unit operator=null SET_BACKING_FIELD number type=kotlin.Unit operator=null
GET_VAR number type=kotlin.Double operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR number type=kotlin.Double operator=INITIALIZE_PROPERTY_FROM_PARAMETER
INSTANCE_INITIALIZER_CALL classDescriptor=Const INSTANCE_INITIALIZER_CALL classDescriptor=Const
@@ -16,7 +17,7 @@ FILE /sealedClasses.kt
CLASS CLASS Sum CLASS CLASS Sum
CONSTRUCTOR public constructor Sum(/*0*/ e1: Expr, /*1*/ e2: Expr) CONSTRUCTOR public constructor Sum(/*0*/ e1: Expr, /*1*/ e2: Expr)
BLOCK_BODY BLOCK_BODY
CALL .<init> type=Expr operator=SUPER_CONSTRUCTOR_CALL DELEGATING_CONSTRUCTOR_CALL Expr
SET_BACKING_FIELD e1 type=kotlin.Unit operator=null SET_BACKING_FIELD e1 type=kotlin.Unit operator=null
GET_VAR e1 type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR e1 type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER
SET_BACKING_FIELD e2 type=kotlin.Unit operator=null SET_BACKING_FIELD e2 type=kotlin.Unit operator=null
@@ -31,5 +32,5 @@ FILE /sealedClasses.kt
CLASS OBJECT NotANumber CLASS OBJECT NotANumber
CONSTRUCTOR private constructor NotANumber() CONSTRUCTOR private constructor NotANumber()
BLOCK_BODY BLOCK_BODY
CALL .<init> type=Expr operator=SUPER_CONSTRUCTOR_CALL DELEGATING_CONSTRUCTOR_CALL Expr
INSTANCE_INITIALIZER_CALL classDescriptor=NotANumber INSTANCE_INITIALIZER_CALL classDescriptor=NotANumber
@@ -2,6 +2,7 @@ FILE /secondaryConstructorWithInitializersFromClassBody.kt
CLASS CLASS Base CLASS CLASS Base
CONSTRUCTOR public constructor Base() CONSTRUCTOR public constructor Base()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Base INSTANCE_INITIALIZER_CALL classDescriptor=Base
CLASS CLASS TestProperty CLASS CLASS TestProperty
PROPERTY public final val x: kotlin.Int = 0 PROPERTY public final val x: kotlin.Int = 0
+2 -1
View File
@@ -2,6 +2,7 @@ FILE /superCalls.kt
CLASS CLASS Base CLASS CLASS Base
CONSTRUCTOR public constructor Base() CONSTRUCTOR public constructor Base()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Base INSTANCE_INITIALIZER_CALL classDescriptor=Base
FUN public open fun foo(): kotlin.Unit FUN public open fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
@@ -11,7 +12,7 @@ FILE /superCalls.kt
CLASS CLASS Derived CLASS CLASS Derived
CONSTRUCTOR public constructor Derived() CONSTRUCTOR public constructor Derived()
BLOCK_BODY BLOCK_BODY
CALL .<init> type=Base operator=SUPER_CONSTRUCTOR_CALL DELEGATING_CONSTRUCTOR_CALL Base
INSTANCE_INITIALIZER_CALL classDescriptor=Derived INSTANCE_INITIALIZER_CALL classDescriptor=Derived
FUN public open override /*1*/ fun foo(): kotlin.Unit FUN public open override /*1*/ fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
@@ -19,6 +19,7 @@ FILE /delegatedProperties.kt
CLASS CLASS C CLASS CLASS C
CONSTRUCTOR public constructor C(/*0*/ map: kotlin.collections.MutableMap<kotlin.String, kotlin.Any>) CONSTRUCTOR public constructor C(/*0*/ map: kotlin.collections.MutableMap<kotlin.String, kotlin.Any>)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
SET_BACKING_FIELD map type=kotlin.Unit operator=null SET_BACKING_FIELD map type=kotlin.Unit operator=null
GET_VAR map type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR map type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> operator=INITIALIZE_PROPERTY_FROM_PARAMETER
INSTANCE_INITIALIZER_CALL classDescriptor=C INSTANCE_INITIALIZER_CALL classDescriptor=C
@@ -6,5 +6,6 @@ FILE /typeAlias.kt
CLASS CLASS C CLASS CLASS C
CONSTRUCTOR public constructor C() CONSTRUCTOR public constructor C()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=C INSTANCE_INITIALIZER_CALL classDescriptor=C
TYPEALIAS TestNested type=kotlin.String TYPEALIAS TestNested type=kotlin.String
@@ -14,6 +14,7 @@ FILE /arrayAugmentedAssignment1.kt
CLASS CLASS C CLASS CLASS C
CONSTRUCTOR public constructor C(/*0*/ x: kotlin.IntArray) CONSTRUCTOR public constructor C(/*0*/ x: kotlin.IntArray)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
SET_BACKING_FIELD x type=kotlin.Unit operator=null SET_BACKING_FIELD x type=kotlin.Unit operator=null
GET_VAR x type=kotlin.IntArray operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR x type=kotlin.IntArray operator=INITIALIZE_PROPERTY_FROM_PARAMETER
INSTANCE_INITIALIZER_CALL classDescriptor=C INSTANCE_INITIALIZER_CALL classDescriptor=C
@@ -2,6 +2,7 @@ FILE /assignments.kt
CLASS CLASS Ref CLASS CLASS Ref
CONSTRUCTOR public constructor Ref(/*0*/ x: kotlin.Int) CONSTRUCTOR public constructor Ref(/*0*/ x: kotlin.Int)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
SET_BACKING_FIELD x type=kotlin.Unit operator=null SET_BACKING_FIELD x type=kotlin.Unit operator=null
GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
INSTANCE_INITIALIZER_CALL classDescriptor=Ref INSTANCE_INITIALIZER_CALL classDescriptor=Ref
@@ -2,6 +2,7 @@ FILE /augmentedAssignment2.kt
CLASS CLASS A CLASS CLASS A
CONSTRUCTOR public constructor A() CONSTRUCTOR public constructor A()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=A INSTANCE_INITIALIZER_CALL classDescriptor=A
FUN public operator fun A.plusAssign(/*0*/ s: kotlin.String): kotlin.Unit FUN public operator fun A.plusAssign(/*0*/ s: kotlin.String): kotlin.Unit
BLOCK_BODY BLOCK_BODY
@@ -2,6 +2,7 @@ FILE /chainOfSafeCalls.kt
CLASS CLASS C CLASS CLASS C
CONSTRUCTOR public constructor C() CONSTRUCTOR public constructor C()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=C INSTANCE_INITIALIZER_CALL classDescriptor=C
FUN public final fun foo(): C FUN public final fun foo(): C
BLOCK_BODY BLOCK_BODY
@@ -2,10 +2,12 @@ FILE /forWithImplicitReceivers.kt
CLASS OBJECT FiveTimes CLASS OBJECT FiveTimes
CONSTRUCTOR private constructor FiveTimes() CONSTRUCTOR private constructor FiveTimes()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=FiveTimes INSTANCE_INITIALIZER_CALL classDescriptor=FiveTimes
CLASS CLASS IntCell CLASS CLASS IntCell
CONSTRUCTOR public constructor IntCell(/*0*/ value: kotlin.Int) CONSTRUCTOR public constructor IntCell(/*0*/ value: kotlin.Int)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
SET_BACKING_FIELD value type=kotlin.Unit operator=null SET_BACKING_FIELD value type=kotlin.Unit operator=null
GET_VAR value type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR value type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
INSTANCE_INITIALIZER_CALL classDescriptor=IntCell INSTANCE_INITIALIZER_CALL classDescriptor=IntCell
@@ -23,6 +23,7 @@ FILE /jvmStaticFieldReference.kt
CLASS CLASS TestClass CLASS CLASS TestClass
CONSTRUCTOR public constructor TestClass() CONSTRUCTOR public constructor TestClass()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=TestClass INSTANCE_INITIALIZER_CALL classDescriptor=TestClass
PROPERTY public final val test: kotlin.Int PROPERTY public final val test: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
@@ -2,6 +2,7 @@ FILE /reflectionLiterals.kt
CLASS CLASS A CLASS CLASS A
CONSTRUCTOR public constructor A() CONSTRUCTOR public constructor A()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=A INSTANCE_INITIALIZER_CALL classDescriptor=A
FUN public final fun foo(): kotlin.Unit FUN public final fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
@@ -2,6 +2,7 @@ FILE /safeCallWithIncrementDecrement.kt
CLASS CLASS C CLASS CLASS C
CONSTRUCTOR public constructor C() CONSTRUCTOR public constructor C()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=C INSTANCE_INITIALIZER_CALL classDescriptor=C
PROPERTY public var test.C?.p: kotlin.Int PROPERTY public var test.C?.p: kotlin.Int
PROPERTY_GETTER public fun test.C?.<get-p>(): kotlin.Int PROPERTY_GETTER public fun test.C?.<get-p>(): kotlin.Int
+1
View File
@@ -2,6 +2,7 @@ FILE /safeCalls.kt
CLASS CLASS Ref CLASS CLASS Ref
CONSTRUCTOR public constructor Ref(/*0*/ value: kotlin.Int) CONSTRUCTOR public constructor Ref(/*0*/ value: kotlin.Int)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
SET_BACKING_FIELD value type=kotlin.Unit operator=null SET_BACKING_FIELD value type=kotlin.Unit operator=null
GET_VAR value type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR value type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
INSTANCE_INITIALIZER_CALL classDescriptor=Ref INSTANCE_INITIALIZER_CALL classDescriptor=Ref
+3
View File
@@ -13,6 +13,7 @@ FILE /values.kt
CLASS OBJECT A CLASS OBJECT A
CONSTRUCTOR private constructor A() CONSTRUCTOR private constructor A()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=A INSTANCE_INITIALIZER_CALL classDescriptor=A
PROPERTY public val a: kotlin.Int = 0 PROPERTY public val a: kotlin.Int = 0
EXPRESSION_BODY EXPRESSION_BODY
@@ -20,10 +21,12 @@ FILE /values.kt
CLASS CLASS Z CLASS CLASS Z
CONSTRUCTOR public constructor Z() CONSTRUCTOR public constructor Z()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Z INSTANCE_INITIALIZER_CALL classDescriptor=Z
CLASS OBJECT Companion CLASS OBJECT Companion
CONSTRUCTOR private constructor Companion() CONSTRUCTOR private constructor Companion()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Companion INSTANCE_INITIALIZER_CALL classDescriptor=Companion
FUN public fun test1(): Enum FUN public fun test1(): Enum
BLOCK_BODY BLOCK_BODY
+1
View File
@@ -2,6 +2,7 @@ FILE /when.kt
CLASS OBJECT A CLASS OBJECT A
CONSTRUCTOR private constructor A() CONSTRUCTOR private constructor A()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=A INSTANCE_INITIALIZER_CALL classDescriptor=A
FUN public fun testWithSubject(/*0*/ x: kotlin.Any?): kotlin.String FUN public fun testWithSubject(/*0*/ x: kotlin.Any?): kotlin.String
BLOCK_BODY BLOCK_BODY
@@ -2,10 +2,12 @@ FILE /multipleImplicitReceivers.kt
CLASS OBJECT A CLASS OBJECT A
CONSTRUCTOR private constructor A() CONSTRUCTOR private constructor A()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=A INSTANCE_INITIALIZER_CALL classDescriptor=A
CLASS OBJECT B CLASS OBJECT B
CONSTRUCTOR private constructor B() CONSTRUCTOR private constructor B()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=B INSTANCE_INITIALIZER_CALL classDescriptor=B
CLASS INTERFACE IFoo CLASS INTERFACE IFoo
PROPERTY public open val A.foo: B PROPERTY public open val A.foo: B
@@ -115,6 +115,12 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
doTest(fileName); doTest(fileName);
} }
@TestMetadata("innerClass.kt")
public void testInnerClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/innerClass.kt");
doTest(fileName);
}
@TestMetadata("localClasses.kt") @TestMetadata("localClasses.kt")
public void testLocalClasses() throws Exception { public void testLocalClasses() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/localClasses.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/localClasses.kt");