From d798071e06935c58c5c42d5b5f659020d19ce9db Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Mon, 29 Jun 2020 16:27:23 +0300 Subject: [PATCH] IrConstTransformer: drop unnecessary argument existence check --- .../kotlin/fir/backend/evaluate/IrConstTransformer.kt | 3 --- .../collectionLiterals/collectionLiteralsInArgumentPosition.kt | 1 - 2 files changed, 4 deletions(-) diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/evaluate/IrConstTransformer.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/evaluate/IrConstTransformer.kt index b8bb0bd5c97..b12cc9b41b9 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/evaluate/IrConstTransformer.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/evaluate/IrConstTransformer.kt @@ -57,9 +57,6 @@ class IrConstTransformer(irBuiltIns: IrBuiltIns) : IrElementTransformerVoid() { private fun transformAnnotations(annotationContainer: IrAnnotationContainer) { annotationContainer.annotations.forEach { annotation -> - // TODO this check can be removed after fix with annotation call arguments mapping - if ((0 until annotation.valueArgumentsCount).any { annotation.getValueArgument(it) == null }) return@forEach - for (i in 0 until annotation.valueArgumentsCount) { val arg = annotation.getValueArgument(i) ?: continue when (arg) { diff --git a/compiler/testData/codegen/box/collectionLiterals/collectionLiteralsInArgumentPosition.kt b/compiler/testData/codegen/box/collectionLiterals/collectionLiteralsInArgumentPosition.kt index 14f0b3246c4..7f01c7db9c5 100644 --- a/compiler/testData/codegen/box/collectionLiterals/collectionLiteralsInArgumentPosition.kt +++ b/compiler/testData/codegen/box/collectionLiterals/collectionLiteralsInArgumentPosition.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // WITH_REFLECT // TARGET_BACKEND: JVM