Fir2IrLazyProperty: drop redundant error type check
This commit is contained in:
committed by
Space Team
parent
0e6a7bbe82
commit
09175c7d56
@@ -106,8 +106,7 @@ class Fir2IrLazyProperty(
|
|||||||
}
|
}
|
||||||
// Setting initializers to every other class causes some cryptic errors in lowerings
|
// Setting initializers to every other class causes some cryptic errors in lowerings
|
||||||
initializer is FirConstExpression<*> -> {
|
initializer is FirConstExpression<*> -> {
|
||||||
// TODO: Normally we shouldn't have error type here
|
val constType = with(typeConverter) { initializer.typeRef.toIrType() }
|
||||||
val constType = with(typeConverter) { initializer.typeRef.toIrType().takeIf { it !is IrErrorType } ?: type }
|
|
||||||
factory.createExpressionBody(initializer.toIrConst(constType))
|
factory.createExpressionBody(initializer.toIrConst(constType))
|
||||||
}
|
}
|
||||||
else -> null
|
else -> null
|
||||||
|
|||||||
Reference in New Issue
Block a user