diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/RangeCodegenUtil.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/RangeCodegenUtil.java index 9e9d0385a04..8f17fcc17c9 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/RangeCodegenUtil.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/RangeCodegenUtil.java @@ -19,11 +19,11 @@ package org.jetbrains.kotlin.codegen; import com.google.common.collect.ImmutableMap; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.jetbrains.kotlin.builtins.KotlinBuiltIns; import org.jetbrains.kotlin.builtins.PrimitiveType; import org.jetbrains.kotlin.descriptors.CallableDescriptor; import org.jetbrains.kotlin.descriptors.ClassifierDescriptor; import org.jetbrains.kotlin.name.FqName; +import org.jetbrains.kotlin.name.FqNameUnsafe; import org.jetbrains.kotlin.name.Name; import org.jetbrains.kotlin.psi.*; import org.jetbrains.kotlin.resolve.DescriptorUtils; @@ -107,7 +107,10 @@ public class RangeCodegenUtil { @NotNull ImmutableMap map ) { ClassifierDescriptor declarationDescriptor = rangeOrProgression.getConstructor().getDeclarationDescriptor(); - return declarationDescriptor == null ? null : map.get(DescriptorUtils.getFqNameSafe(declarationDescriptor)); + if (declarationDescriptor == null) return null; + FqNameUnsafe fqName = DescriptorUtils.getFqName(declarationDescriptor); + if (!fqName.isSafe()) return null; + return map.get(fqName.toSafe()); } @Nullable