Property initializers from primary constructor parameters
are generated as property initializer expressions and should not be repeated in primary constructor.
This commit is contained in:
committed by
Dmitry Petrov
parent
a9dbaca473
commit
8fc16345e6
@@ -3,12 +3,6 @@ FILE /primaryConstructor.kt
|
||||
CONSTRUCTOR public constructor Test1(x: kotlin.Int, y: kotlin.Int)
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null
|
||||
receiver: THIS of 'Test1' type=Test1
|
||||
value: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
SET_BACKING_FIELD 'y: Int' type=kotlin.Unit operator=null
|
||||
receiver: THIS of 'Test1' type=Test1
|
||||
value: GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test1'
|
||||
PROPERTY public final val x: kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
@@ -20,9 +14,6 @@ FILE /primaryConstructor.kt
|
||||
CONSTRUCTOR public constructor Test2(x: kotlin.Int, y: kotlin.Int)
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
SET_BACKING_FIELD 'y: Int' type=kotlin.Unit operator=null
|
||||
receiver: THIS of 'Test2' type=Test2
|
||||
value: GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test2'
|
||||
PROPERTY public final val y: kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
@@ -34,9 +25,6 @@ FILE /primaryConstructor.kt
|
||||
CONSTRUCTOR public constructor Test3(x: kotlin.Int, y: kotlin.Int)
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
SET_BACKING_FIELD 'y: Int' type=kotlin.Unit operator=null
|
||||
receiver: THIS of 'Test3' type=Test3
|
||||
value: GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test3'
|
||||
PROPERTY public final val y: kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
|
||||
Reference in New Issue
Block a user