[K/N] Extract const val initializers to place of usage
This would make behaviour more consistent with jvm. There is still a difference in behaviour about point where side effects happen. ^KT-52970
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
open class A(val a: String = DEFAULT_A){
|
||||
companion object: A(){
|
||||
const val DEFAULT_A = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box() = A().a
|
||||
Reference in New Issue
Block a user