[FIR2IR] Disable initializer generation for external enum entries

This commit is contained in:
simon.ogorodnik
2020-04-27 19:07:11 +03:00
committed by Mikhail Glukhikh
parent 4133749ee7
commit 6ca3a994d9
4 changed files with 1 additions and 4 deletions
@@ -339,7 +339,7 @@ class Fir2IrClassifierStorage(
val klass = getIrAnonymousObjectForEnumEntry(initializer, enumEntry.name, irParent)
this.correspondingClass = klass
} else if (irParent != null) {
} else if (irParent != null && origin == IrDeclarationOrigin.DEFINED) {
this.initializerExpression = IrExpressionBodyImpl(
IrEnumConstructorCallImpl(startOffset, endOffset, irType, irParent.constructors.first().symbol)
)
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_REFLECT
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE