Primary constructor to secondary: always try to build constructor body #KT-14475 Fixed
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
fun println(arg: Int) = arg
|
||||
|
||||
class My<caret>() {
|
||||
val x = 1
|
||||
|
||||
val y = 2
|
||||
|
||||
init {
|
||||
println(x)
|
||||
println(y)
|
||||
}
|
||||
}
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
fun println(arg: Int) = arg
|
||||
|
||||
class My {
|
||||
constructor() {
|
||||
println(x)
|
||||
println(y)
|
||||
}
|
||||
|
||||
val x: Int = 1
|
||||
|
||||
val y: Int = 2
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user