Constructors represented "as in Java".
TODO: extract nested initializers somehow.
This commit is contained in:
committed by
Dmitry Petrov
parent
57c1b3e0e2
commit
8528c23194
+31
@@ -0,0 +1,31 @@
|
||||
FILE /primaryConstructorWithSuperConstructorCall.kt
|
||||
CLASS CLASS Base
|
||||
FUN public constructor Base()
|
||||
BLOCK_BODY
|
||||
CLASS CLASS TestImplicitPrimaryConstructor
|
||||
FUN public constructor TestImplicitPrimaryConstructor()
|
||||
BLOCK_BODY
|
||||
CALL .<init> type=Base operator=SUPER_CONSTRUCTOR_CALL
|
||||
CLASS CLASS TestExplicitPrimaryConstructor
|
||||
FUN public constructor TestExplicitPrimaryConstructor()
|
||||
BLOCK_BODY
|
||||
CALL .<init> type=Base operator=SUPER_CONSTRUCTOR_CALL
|
||||
CLASS CLASS TestWithDelegatingConstructor
|
||||
FUN public constructor TestWithDelegatingConstructor(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int)
|
||||
BLOCK_BODY
|
||||
CALL .<init> type=Base operator=SUPER_CONSTRUCTOR_CALL
|
||||
SET_BACKING_FIELD x type=kotlin.Unit operator=null
|
||||
GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
SET_BACKING_FIELD y type=kotlin.Unit operator=null
|
||||
GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
PROPERTY public final val x: kotlin.Int getter=null setter=null
|
||||
EXPRESSION_BODY
|
||||
GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
PROPERTY public final val y: kotlin.Int getter=null setter=null
|
||||
EXPRESSION_BODY
|
||||
GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN public constructor TestWithDelegatingConstructor(/*0*/ x: kotlin.Int)
|
||||
BLOCK_BODY
|
||||
CALL .<init> type=TestWithDelegatingConstructor operator=DELEGATING_CONSTRUCTOR_CALL
|
||||
x: GET_VAR x type=kotlin.Int operator=null
|
||||
y: CONST Int type=kotlin.Int value='0'
|
||||
Reference in New Issue
Block a user