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
+4 -3
View File
@@ -2,11 +2,12 @@ FILE /sealedClasses.kt
CLASS CLASS Expr
CONSTRUCTOR private constructor Expr()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
INSTANCE_INITIALIZER_CALL classDescriptor=Expr
CLASS CLASS Const
CONSTRUCTOR public constructor Const(/*0*/ number: kotlin.Double)
BLOCK_BODY
CALL .<init> type=Expr operator=SUPER_CONSTRUCTOR_CALL
DELEGATING_CONSTRUCTOR_CALL Expr
SET_BACKING_FIELD number type=kotlin.Unit operator=null
GET_VAR number type=kotlin.Double operator=INITIALIZE_PROPERTY_FROM_PARAMETER
INSTANCE_INITIALIZER_CALL classDescriptor=Const
@@ -16,7 +17,7 @@ FILE /sealedClasses.kt
CLASS CLASS Sum
CONSTRUCTOR public constructor Sum(/*0*/ e1: Expr, /*1*/ e2: Expr)
BLOCK_BODY
CALL .<init> type=Expr operator=SUPER_CONSTRUCTOR_CALL
DELEGATING_CONSTRUCTOR_CALL Expr
SET_BACKING_FIELD e1 type=kotlin.Unit operator=null
GET_VAR e1 type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER
SET_BACKING_FIELD e2 type=kotlin.Unit operator=null
@@ -31,5 +32,5 @@ FILE /sealedClasses.kt
CLASS OBJECT NotANumber
CONSTRUCTOR private constructor NotANumber()
BLOCK_BODY
CALL .<init> type=Expr operator=SUPER_CONSTRUCTOR_CALL
DELEGATING_CONSTRUCTOR_CALL Expr
INSTANCE_INITIALIZER_CALL classDescriptor=NotANumber