FIR2IR: drop error type check in createIrProperty
This commit is contained in:
committed by
Space Team
parent
595aace885
commit
2c0c9e5b5c
+1
-2
@@ -985,8 +985,7 @@ class Fir2IrDeclarationStorage(
|
||||
property.name, property.isVal, initializer, typeToUse
|
||||
).also { field ->
|
||||
if (initializer is FirConstExpression<*>) {
|
||||
// TODO: Normally we shouldn't have error type here
|
||||
val constType = initializer.typeRef.toIrType().takeIf { it !is IrErrorType } ?: typeToUse
|
||||
val constType = initializer.typeRef.toIrType()
|
||||
field.initializer = factory.createExpressionBody(initializer.toIrConst(constType))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user