Fix enum entry class delegating constructor call generation
When the enum entry requires a specific class, its constructor should invoke proper supertype constructor (from the corresponding enum class). Corresponding resolved call should be passed from the front-end in CONSTRUCTOR_RESOLVED_DELEGATION_CALL slice. In case of enum entries without explicit supertype initializer, this information was missing.
This commit is contained in:
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
enum class Test(val str: String = "OK") {
|
||||
OK {
|
||||
fun foo() {}
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String =
|
||||
Test.OK.str
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
|
||||
enum class Test(vararg xs: Int) {
|
||||
OK {
|
||||
fun foo() {}
|
||||
};
|
||||
val xs = xs
|
||||
}
|
||||
|
||||
fun box(): String =
|
||||
if (Test.OK.xs.size == 0) "OK" else "Fail"
|
||||
Reference in New Issue
Block a user