Some additional secondary constructor examples.
This commit is contained in:
committed by
Dmitry Petrov
parent
3e96f7b015
commit
0c0dac4822
+3
@@ -11,4 +11,7 @@ class TestInitBlock : Base {
|
|||||||
x = 0
|
x = 0
|
||||||
}
|
}
|
||||||
constructor()
|
constructor()
|
||||||
|
constructor(z: Any)
|
||||||
|
|
||||||
|
constructor(y: Int): this()
|
||||||
}
|
}
|
||||||
|
|||||||
+7
@@ -23,3 +23,10 @@ FILE /secondaryConstructorWithInitializersFromClassBody.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Base()'
|
DELEGATING_CONSTRUCTOR_CALL 'constructor Base()'
|
||||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitBlock'
|
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitBlock'
|
||||||
|
CONSTRUCTOR public constructor TestInitBlock(z: kotlin.Any)
|
||||||
|
BLOCK_BODY
|
||||||
|
DELEGATING_CONSTRUCTOR_CALL 'constructor Base()'
|
||||||
|
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitBlock'
|
||||||
|
CONSTRUCTOR public constructor TestInitBlock(y: kotlin.Int)
|
||||||
|
BLOCK_BODY
|
||||||
|
DELEGATING_CONSTRUCTOR_CALL 'constructor TestInitBlock()'
|
||||||
|
|||||||
Reference in New Issue
Block a user