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
@@ -16,9 +16,6 @@ FILE /enum.kt
|
||||
CONSTRUCTOR private constructor TestEnum2(x: kotlin.Int)
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' super
|
||||
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null
|
||||
receiver: THIS of 'TestEnum2' type=TestEnum2
|
||||
value: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum2'
|
||||
PROPERTY public final val x: kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
@@ -61,9 +58,6 @@ FILE /enum.kt
|
||||
CONSTRUCTOR private constructor TestEnum4(x: kotlin.Int)
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' super
|
||||
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null
|
||||
receiver: THIS of 'TestEnum4' type=TestEnum4
|
||||
value: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum4'
|
||||
PROPERTY public final val x: kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
|
||||
Reference in New Issue
Block a user