From 09175c7d5608e2cc3d1756642b709464acb6941d Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Mon, 26 Jun 2023 15:00:54 +0300 Subject: [PATCH] Fir2IrLazyProperty: drop redundant error type check --- .../src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyProperty.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyProperty.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyProperty.kt index 7dcc8206824..3cf0d8acb02 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyProperty.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyProperty.kt @@ -106,8 +106,7 @@ class Fir2IrLazyProperty( } // Setting initializers to every other class causes some cryptic errors in lowerings initializer is FirConstExpression<*> -> { - // TODO: Normally we shouldn't have error type here - val constType = with(typeConverter) { initializer.typeRef.toIrType().takeIf { it !is IrErrorType } ?: type } + val constType = with(typeConverter) { initializer.typeRef.toIrType() } factory.createExpressionBody(initializer.toIrConst(constType)) } else -> null