TEST: primary/secondary constructor fields initialization
This commit is contained in:
committed by
vvlevchenko
parent
62917fd171
commit
48ee81548e
@@ -0,0 +1,8 @@
|
||||
class B(val a:Int, b:Int) {
|
||||
constructor(pos:Int):this(1, pos) {}
|
||||
val pos = b + 1
|
||||
}
|
||||
|
||||
fun primaryConstructorCall(a:Int, b:Int) = B(a, b).pos
|
||||
|
||||
fun secondaryConstructorCall(a:Int) = B(a).pos
|
||||
Reference in New Issue
Block a user