Minor: add test for primary constructor default parameter values.
This commit is contained in:
committed by
Dmitry Petrov
parent
201d2414bc
commit
1a3dedaf1c
@@ -0,0 +1 @@
|
||||
class Test(val x: Int = 0)
|
||||
@@ -0,0 +1,17 @@
|
||||
FILE /primaryCtorDefaultArguments.kt
|
||||
CLASS CLASS Test
|
||||
CONSTRUCTOR public constructor Test(x: kotlin.Int = ...)
|
||||
x: EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test'
|
||||
PROPERTY public final val x: kotlin.Int
|
||||
FIELD public final val x: kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int = ...' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN public final fun <get-x>(): kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null
|
||||
receiver: THIS of 'Test' type=Test
|
||||
Reference in New Issue
Block a user