JVM_IR: Support init blocks in inline classes
Put their content to constructor-impl, so they are called during constructor call, but they are not called during boxing, because box-impl calls <init> and not constructor-impl. #KT-28055 In progress
This commit is contained in:
Vendored
+2
-2
@@ -2,9 +2,9 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
|
||||
inline class Foo(val x: Int) {
|
||||
<!INLINE_CLASS_WITH_INITIALIZER!>init<!> {}
|
||||
init {}
|
||||
|
||||
<!INLINE_CLASS_WITH_INITIALIZER!>init<!> {
|
||||
init {
|
||||
val f = 1
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user