From 83189013c6efdfb75d4114dcdb9307c0a42b3058 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Wed, 9 Dec 2015 14:05:42 +0300 Subject: [PATCH] Minor. Drop deprecated unary operator names from JS back-end --- .../src/org/jetbrains/kotlin/util/OperatorNameConventions.kt | 3 +-- .../functions/factories/PrimitiveUnaryOperationFIF.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/descriptors/src/org/jetbrains/kotlin/util/OperatorNameConventions.kt b/core/descriptors/src/org/jetbrains/kotlin/util/OperatorNameConventions.kt index d146618c3bd..e13bff7b92d 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/util/OperatorNameConventions.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/util/OperatorNameConventions.kt @@ -17,7 +17,6 @@ package org.jetbrains.kotlin.util import org.jetbrains.kotlin.name.Name -import java.util.* import kotlin.text.Regex object OperatorNameConventions { @@ -63,7 +62,7 @@ object OperatorNameConventions { // If you add new unary, binary or assignment operators, add it to OperatorConventions as well - val UNARY_OPERATION_NAMES_WITH_DEPRECATED = Collections.unmodifiableSet(setOf(INC, DEC, UNARY_PLUS, PLUS, UNARY_MINUS, MINUS, NOT)) + @JvmField internal val UNARY_OPERATION_NAMES = setOf(INC, DEC, UNARY_PLUS, UNARY_MINUS, NOT) internal val SIMPLE_UNARY_OPERATION_NAMES = setOf(UNARY_PLUS, UNARY_MINUS, NOT) internal val BINARY_OPERATION_NAMES = setOf(TIMES, PLUS, MINUS, DIV, MOD, RANGE_TO) diff --git a/js/js.translator/src/org/jetbrains/kotlin/js/translate/intrinsic/functions/factories/PrimitiveUnaryOperationFIF.java b/js/js.translator/src/org/jetbrains/kotlin/js/translate/intrinsic/functions/factories/PrimitiveUnaryOperationFIF.java index 79147aa2ce1..54298a62ad1 100644 --- a/js/js.translator/src/org/jetbrains/kotlin/js/translate/intrinsic/functions/factories/PrimitiveUnaryOperationFIF.java +++ b/js/js.translator/src/org/jetbrains/kotlin/js/translate/intrinsic/functions/factories/PrimitiveUnaryOperationFIF.java @@ -43,7 +43,7 @@ public enum PrimitiveUnaryOperationFIF implements FunctionIntrinsicFactory { INSTANCE; - private static final NamePredicate UNARY_OPERATIONS = new NamePredicate(OperatorNameConventions.UNARY_OPERATION_NAMES_WITH_DEPRECATED); + private static final NamePredicate UNARY_OPERATIONS = new NamePredicate(OperatorNameConventions.UNARY_OPERATION_NAMES); @NotNull private static final DescriptorPredicate UNARY_OPERATION_FOR_PRIMITIVE_NUMBER = pattern(NamePredicate.PRIMITIVE_NUMBERS_MAPPED_TO_PRIMITIVE_JS, UNARY_OPERATIONS);