From 39b27751df5a11e3d9cccfe9603eeabaf85af690 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Thu, 2 Jul 2015 18:04:54 +0300 Subject: [PATCH] Drop deprecated char operations: correct test data. --- compiler/testData/builtin-classes.txt | 78 ------------------- .../codegen/box/primitiveTypes/rangeTo.kt | 20 +---- .../assignmentOperationsCheckReturnType.kt | 8 +- .../pseudocodeMemoryOverhead.kt | 73 +---------------- .../parameters/expressions/unaryMinus.kt | 7 +- .../parameters/expressions/unaryPlus.kt | 7 +- .../kotlin/types/JetTypeCheckerTest.java | 3 - .../char/cases/charBinaryOperations.kt | 68 +--------------- .../char/cases/charCompareToIntrinsic.kt | 17 +--- .../char/cases/charUnaryOperations.kt | 4 - .../testData/number/cases/numberCompareTo.kt | 13 ---- 11 files changed, 17 insertions(+), 281 deletions(-) diff --git a/compiler/testData/builtin-classes.txt b/compiler/testData/builtin-classes.txt index f17d20445cd..639eb8f2ffd 100644 --- a/compiler/testData/builtin-classes.txt +++ b/compiler/testData/builtin-classes.txt @@ -49,7 +49,6 @@ public abstract class BooleanIterator : kotlin.Iterator { public final class Byte : kotlin.Number, kotlin.Comparable { /*primary*/ private constructor Byte() public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun compareTo(/*0*/ other: kotlin.Char): kotlin.Int public final fun compareTo(/*0*/ other: kotlin.Double): kotlin.Int public final fun compareTo(/*0*/ other: kotlin.Float): kotlin.Int public final fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int @@ -57,7 +56,6 @@ public final class Byte : kotlin.Number, kotlin.Comparable { public final fun compareTo(/*0*/ other: kotlin.Short): kotlin.Int public final fun dec(): kotlin.Byte public final fun div(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun div(/*0*/ other: kotlin.Char): kotlin.Int public final fun div(/*0*/ other: kotlin.Double): kotlin.Double public final fun div(/*0*/ other: kotlin.Float): kotlin.Float public final fun div(/*0*/ other: kotlin.Int): kotlin.Int @@ -66,14 +64,12 @@ public final class Byte : kotlin.Number, kotlin.Comparable { public final fun inc(): kotlin.Byte public final fun minus(): kotlin.Int public final fun minus(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun minus(/*0*/ other: kotlin.Char): kotlin.Int public final fun minus(/*0*/ other: kotlin.Double): kotlin.Double public final fun minus(/*0*/ other: kotlin.Float): kotlin.Float public final fun minus(/*0*/ other: kotlin.Int): kotlin.Int public final fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final fun minus(/*0*/ other: kotlin.Short): kotlin.Int public final fun mod(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun mod(/*0*/ other: kotlin.Char): kotlin.Int public final fun mod(/*0*/ other: kotlin.Double): kotlin.Double public final fun mod(/*0*/ other: kotlin.Float): kotlin.Float public final fun mod(/*0*/ other: kotlin.Int): kotlin.Int @@ -81,21 +77,18 @@ public final class Byte : kotlin.Number, kotlin.Comparable { public final fun mod(/*0*/ other: kotlin.Short): kotlin.Int public final fun plus(): kotlin.Int public final fun plus(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun plus(/*0*/ other: kotlin.Char): kotlin.Int public final fun plus(/*0*/ other: kotlin.Double): kotlin.Double public final fun plus(/*0*/ other: kotlin.Float): kotlin.Float public final fun plus(/*0*/ other: kotlin.Int): kotlin.Int public final fun plus(/*0*/ other: kotlin.Long): kotlin.Long public final fun plus(/*0*/ other: kotlin.Short): kotlin.Int public final fun rangeTo(/*0*/ other: kotlin.Byte): kotlin.ByteRange - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun rangeTo(/*0*/ other: kotlin.Char): kotlin.CharRange public final fun rangeTo(/*0*/ other: kotlin.Double): kotlin.DoubleRange public final fun rangeTo(/*0*/ other: kotlin.Float): kotlin.FloatRange public final fun rangeTo(/*0*/ other: kotlin.Int): kotlin.IntRange public final fun rangeTo(/*0*/ other: kotlin.Long): kotlin.LongRange public final fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ShortRange public final fun times(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun times(/*0*/ other: kotlin.Char): kotlin.Int public final fun times(/*0*/ other: kotlin.Double): kotlin.Double public final fun times(/*0*/ other: kotlin.Float): kotlin.Float public final fun times(/*0*/ other: kotlin.Int): kotlin.Int @@ -184,49 +177,13 @@ public final class ByteRange : kotlin.Range, kotlin.Progression { /*primary*/ private constructor Char() - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int or other operand to Char.") public final fun compareTo(/*0*/ other: kotlin.Byte): kotlin.Int public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Char): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun compareTo(/*0*/ other: kotlin.Double): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun compareTo(/*0*/ other: kotlin.Float): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int or other operand to Char.") public final fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int or other operand to Char.") public final fun compareTo(/*0*/ other: kotlin.Long): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int or other operand to Char.") public final fun compareTo(/*0*/ other: kotlin.Short): kotlin.Int public final fun dec(): kotlin.Char - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun div(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun div(/*0*/ other: kotlin.Double): kotlin.Double - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun div(/*0*/ other: kotlin.Float): kotlin.Float - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun div(/*0*/ other: kotlin.Int): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun div(/*0*/ other: kotlin.Long): kotlin.Long - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun div(/*0*/ other: kotlin.Short): kotlin.Int public final fun inc(): kotlin.Char - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun minus(): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun minus(/*0*/ other: kotlin.Byte): kotlin.Int public final fun minus(/*0*/ other: kotlin.Char): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun minus(/*0*/ other: kotlin.Double): kotlin.Double - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun minus(/*0*/ other: kotlin.Float): kotlin.Float kotlin.deprecated(value = "This operation will change return type to Char in M13. Either call toInt or toChar on return value or convert Char operand to Int.") public final fun minus(/*0*/ other: kotlin.Int): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun minus(/*0*/ other: kotlin.Long): kotlin.Long - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun minus(/*0*/ other: kotlin.Short): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun mod(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun mod(/*0*/ other: kotlin.Double): kotlin.Double - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun mod(/*0*/ other: kotlin.Float): kotlin.Float - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun mod(/*0*/ other: kotlin.Int): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun mod(/*0*/ other: kotlin.Long): kotlin.Long - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun mod(/*0*/ other: kotlin.Short): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun plus(): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun plus(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun plus(/*0*/ other: kotlin.Double): kotlin.Double - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun plus(/*0*/ other: kotlin.Float): kotlin.Float kotlin.deprecated(value = "This operation will change return type to Char in M13. Either call toInt or toChar on return value or convert Char operand to Int.") public final fun plus(/*0*/ other: kotlin.Int): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun plus(/*0*/ other: kotlin.Long): kotlin.Long - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun plus(/*0*/ other: kotlin.Short): kotlin.Int public final fun rangeTo(/*0*/ other: kotlin.Char): kotlin.CharRange - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun times(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun times(/*0*/ other: kotlin.Double): kotlin.Double - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun times(/*0*/ other: kotlin.Float): kotlin.Float - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun times(/*0*/ other: kotlin.Int): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun times(/*0*/ other: kotlin.Long): kotlin.Long - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun times(/*0*/ other: kotlin.Short): kotlin.Int public open fun toByte(): kotlin.Byte public open fun toChar(): kotlin.Char public open fun toDouble(): kotlin.Double @@ -329,7 +286,6 @@ public interface Comparable { public final class Double : kotlin.Number, kotlin.Comparable { /*primary*/ private constructor Double() public final fun compareTo(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun compareTo(/*0*/ other: kotlin.Char): kotlin.Int public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Double): kotlin.Int public final fun compareTo(/*0*/ other: kotlin.Float): kotlin.Int public final fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int @@ -337,7 +293,6 @@ public final class Double : kotlin.Number, kotlin.Comparable { public final fun compareTo(/*0*/ other: kotlin.Short): kotlin.Int public final fun dec(): kotlin.Double public final fun div(/*0*/ other: kotlin.Byte): kotlin.Double - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun div(/*0*/ other: kotlin.Char): kotlin.Double public final fun div(/*0*/ other: kotlin.Double): kotlin.Double public final fun div(/*0*/ other: kotlin.Float): kotlin.Double public final fun div(/*0*/ other: kotlin.Int): kotlin.Double @@ -346,14 +301,12 @@ public final class Double : kotlin.Number, kotlin.Comparable { public final fun inc(): kotlin.Double public final fun minus(): kotlin.Double public final fun minus(/*0*/ other: kotlin.Byte): kotlin.Double - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun minus(/*0*/ other: kotlin.Char): kotlin.Double public final fun minus(/*0*/ other: kotlin.Double): kotlin.Double public final fun minus(/*0*/ other: kotlin.Float): kotlin.Double public final fun minus(/*0*/ other: kotlin.Int): kotlin.Double public final fun minus(/*0*/ other: kotlin.Long): kotlin.Double public final fun minus(/*0*/ other: kotlin.Short): kotlin.Double public final fun mod(/*0*/ other: kotlin.Byte): kotlin.Double - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun mod(/*0*/ other: kotlin.Char): kotlin.Double public final fun mod(/*0*/ other: kotlin.Double): kotlin.Double public final fun mod(/*0*/ other: kotlin.Float): kotlin.Double public final fun mod(/*0*/ other: kotlin.Int): kotlin.Double @@ -361,21 +314,18 @@ public final class Double : kotlin.Number, kotlin.Comparable { public final fun mod(/*0*/ other: kotlin.Short): kotlin.Double public final fun plus(): kotlin.Double public final fun plus(/*0*/ other: kotlin.Byte): kotlin.Double - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun plus(/*0*/ other: kotlin.Char): kotlin.Double public final fun plus(/*0*/ other: kotlin.Double): kotlin.Double public final fun plus(/*0*/ other: kotlin.Float): kotlin.Double public final fun plus(/*0*/ other: kotlin.Int): kotlin.Double public final fun plus(/*0*/ other: kotlin.Long): kotlin.Double public final fun plus(/*0*/ other: kotlin.Short): kotlin.Double public final fun rangeTo(/*0*/ other: kotlin.Byte): kotlin.DoubleRange - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun rangeTo(/*0*/ other: kotlin.Char): kotlin.DoubleRange public final fun rangeTo(/*0*/ other: kotlin.Double): kotlin.DoubleRange public final fun rangeTo(/*0*/ other: kotlin.Float): kotlin.DoubleRange public final fun rangeTo(/*0*/ other: kotlin.Int): kotlin.DoubleRange public final fun rangeTo(/*0*/ other: kotlin.Long): kotlin.DoubleRange public final fun rangeTo(/*0*/ other: kotlin.Short): kotlin.DoubleRange public final fun times(/*0*/ other: kotlin.Byte): kotlin.Double - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun times(/*0*/ other: kotlin.Char): kotlin.Double public final fun times(/*0*/ other: kotlin.Double): kotlin.Double public final fun times(/*0*/ other: kotlin.Float): kotlin.Double public final fun times(/*0*/ other: kotlin.Int): kotlin.Double @@ -479,7 +429,6 @@ public abstract class Enum> : kotlin.Comparable { public final class Float : kotlin.Number, kotlin.Comparable { /*primary*/ private constructor Float() public final fun compareTo(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun compareTo(/*0*/ other: kotlin.Char): kotlin.Int public final fun compareTo(/*0*/ other: kotlin.Double): kotlin.Int public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Float): kotlin.Int public final fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int @@ -487,7 +436,6 @@ public final class Float : kotlin.Number, kotlin.Comparable { public final fun compareTo(/*0*/ other: kotlin.Short): kotlin.Int public final fun dec(): kotlin.Float public final fun div(/*0*/ other: kotlin.Byte): kotlin.Float - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun div(/*0*/ other: kotlin.Char): kotlin.Float public final fun div(/*0*/ other: kotlin.Double): kotlin.Double public final fun div(/*0*/ other: kotlin.Float): kotlin.Float public final fun div(/*0*/ other: kotlin.Int): kotlin.Float @@ -496,14 +444,12 @@ public final class Float : kotlin.Number, kotlin.Comparable { public final fun inc(): kotlin.Float public final fun minus(): kotlin.Float public final fun minus(/*0*/ other: kotlin.Byte): kotlin.Float - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun minus(/*0*/ other: kotlin.Char): kotlin.Float public final fun minus(/*0*/ other: kotlin.Double): kotlin.Double public final fun minus(/*0*/ other: kotlin.Float): kotlin.Float public final fun minus(/*0*/ other: kotlin.Int): kotlin.Float public final fun minus(/*0*/ other: kotlin.Long): kotlin.Float public final fun minus(/*0*/ other: kotlin.Short): kotlin.Float public final fun mod(/*0*/ other: kotlin.Byte): kotlin.Float - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun mod(/*0*/ other: kotlin.Char): kotlin.Float public final fun mod(/*0*/ other: kotlin.Double): kotlin.Double public final fun mod(/*0*/ other: kotlin.Float): kotlin.Float public final fun mod(/*0*/ other: kotlin.Int): kotlin.Float @@ -511,21 +457,18 @@ public final class Float : kotlin.Number, kotlin.Comparable { public final fun mod(/*0*/ other: kotlin.Short): kotlin.Float public final fun plus(): kotlin.Float public final fun plus(/*0*/ other: kotlin.Byte): kotlin.Float - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun plus(/*0*/ other: kotlin.Char): kotlin.Float public final fun plus(/*0*/ other: kotlin.Double): kotlin.Double public final fun plus(/*0*/ other: kotlin.Float): kotlin.Float public final fun plus(/*0*/ other: kotlin.Int): kotlin.Float public final fun plus(/*0*/ other: kotlin.Long): kotlin.Float public final fun plus(/*0*/ other: kotlin.Short): kotlin.Float public final fun rangeTo(/*0*/ other: kotlin.Byte): kotlin.FloatRange - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun rangeTo(/*0*/ other: kotlin.Char): kotlin.FloatRange public final fun rangeTo(/*0*/ other: kotlin.Double): kotlin.DoubleRange public final fun rangeTo(/*0*/ other: kotlin.Float): kotlin.FloatRange public final fun rangeTo(/*0*/ other: kotlin.Int): kotlin.FloatRange public final fun rangeTo(/*0*/ other: kotlin.Long): kotlin.FloatRange public final fun rangeTo(/*0*/ other: kotlin.Short): kotlin.FloatRange public final fun times(/*0*/ other: kotlin.Byte): kotlin.Float - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun times(/*0*/ other: kotlin.Char): kotlin.Float public final fun times(/*0*/ other: kotlin.Double): kotlin.Double public final fun times(/*0*/ other: kotlin.Float): kotlin.Float public final fun times(/*0*/ other: kotlin.Int): kotlin.Float @@ -685,7 +628,6 @@ public final class Int : kotlin.Number, kotlin.Comparable { /*primary*/ private constructor Int() public final fun and(/*0*/ other: kotlin.Int): kotlin.Int public final fun compareTo(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun compareTo(/*0*/ other: kotlin.Char): kotlin.Int public final fun compareTo(/*0*/ other: kotlin.Double): kotlin.Int public final fun compareTo(/*0*/ other: kotlin.Float): kotlin.Int public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int @@ -693,7 +635,6 @@ public final class Int : kotlin.Number, kotlin.Comparable { public final fun compareTo(/*0*/ other: kotlin.Short): kotlin.Int public final fun dec(): kotlin.Int public final fun div(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun div(/*0*/ other: kotlin.Char): kotlin.Int public final fun div(/*0*/ other: kotlin.Double): kotlin.Double public final fun div(/*0*/ other: kotlin.Float): kotlin.Float public final fun div(/*0*/ other: kotlin.Int): kotlin.Int @@ -703,14 +644,12 @@ public final class Int : kotlin.Number, kotlin.Comparable { public final fun inv(): kotlin.Int public final fun minus(): kotlin.Int public final fun minus(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun minus(/*0*/ other: kotlin.Char): kotlin.Int public final fun minus(/*0*/ other: kotlin.Double): kotlin.Double public final fun minus(/*0*/ other: kotlin.Float): kotlin.Float public final fun minus(/*0*/ other: kotlin.Int): kotlin.Int public final fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final fun minus(/*0*/ other: kotlin.Short): kotlin.Int public final fun mod(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun mod(/*0*/ other: kotlin.Char): kotlin.Int public final fun mod(/*0*/ other: kotlin.Double): kotlin.Double public final fun mod(/*0*/ other: kotlin.Float): kotlin.Float public final fun mod(/*0*/ other: kotlin.Int): kotlin.Int @@ -719,14 +658,12 @@ public final class Int : kotlin.Number, kotlin.Comparable { public final fun or(/*0*/ other: kotlin.Int): kotlin.Int public final fun plus(): kotlin.Int public final fun plus(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun plus(/*0*/ other: kotlin.Char): kotlin.Int public final fun plus(/*0*/ other: kotlin.Double): kotlin.Double public final fun plus(/*0*/ other: kotlin.Float): kotlin.Float public final fun plus(/*0*/ other: kotlin.Int): kotlin.Int public final fun plus(/*0*/ other: kotlin.Long): kotlin.Long public final fun plus(/*0*/ other: kotlin.Short): kotlin.Int public final fun rangeTo(/*0*/ other: kotlin.Byte): kotlin.IntRange - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun rangeTo(/*0*/ other: kotlin.Char): kotlin.IntRange public final fun rangeTo(/*0*/ other: kotlin.Double): kotlin.DoubleRange public final fun rangeTo(/*0*/ other: kotlin.Float): kotlin.FloatRange public final fun rangeTo(/*0*/ other: kotlin.Int): kotlin.IntRange @@ -735,7 +672,6 @@ public final class Int : kotlin.Number, kotlin.Comparable { public final fun shl(/*0*/ bits: kotlin.Int): kotlin.Int public final fun shr(/*0*/ bits: kotlin.Int): kotlin.Int public final fun times(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun times(/*0*/ other: kotlin.Char): kotlin.Int public final fun times(/*0*/ other: kotlin.Double): kotlin.Double public final fun times(/*0*/ other: kotlin.Float): kotlin.Float public final fun times(/*0*/ other: kotlin.Int): kotlin.Int @@ -867,7 +803,6 @@ public final class Long : kotlin.Number, kotlin.Comparable { /*primary*/ private constructor Long() public final fun and(/*0*/ other: kotlin.Long): kotlin.Long public final fun compareTo(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun compareTo(/*0*/ other: kotlin.Char): kotlin.Int public final fun compareTo(/*0*/ other: kotlin.Double): kotlin.Int public final fun compareTo(/*0*/ other: kotlin.Float): kotlin.Int public final fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int @@ -875,7 +810,6 @@ public final class Long : kotlin.Number, kotlin.Comparable { public final fun compareTo(/*0*/ other: kotlin.Short): kotlin.Int public final fun dec(): kotlin.Long public final fun div(/*0*/ other: kotlin.Byte): kotlin.Long - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun div(/*0*/ other: kotlin.Char): kotlin.Long public final fun div(/*0*/ other: kotlin.Double): kotlin.Double public final fun div(/*0*/ other: kotlin.Float): kotlin.Float public final fun div(/*0*/ other: kotlin.Int): kotlin.Long @@ -885,14 +819,12 @@ public final class Long : kotlin.Number, kotlin.Comparable { public final fun inv(): kotlin.Long public final fun minus(): kotlin.Long public final fun minus(/*0*/ other: kotlin.Byte): kotlin.Long - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun minus(/*0*/ other: kotlin.Char): kotlin.Long public final fun minus(/*0*/ other: kotlin.Double): kotlin.Double public final fun minus(/*0*/ other: kotlin.Float): kotlin.Float public final fun minus(/*0*/ other: kotlin.Int): kotlin.Long public final fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final fun minus(/*0*/ other: kotlin.Short): kotlin.Long public final fun mod(/*0*/ other: kotlin.Byte): kotlin.Long - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun mod(/*0*/ other: kotlin.Char): kotlin.Long public final fun mod(/*0*/ other: kotlin.Double): kotlin.Double public final fun mod(/*0*/ other: kotlin.Float): kotlin.Float public final fun mod(/*0*/ other: kotlin.Int): kotlin.Long @@ -901,14 +833,12 @@ public final class Long : kotlin.Number, kotlin.Comparable { public final fun or(/*0*/ other: kotlin.Long): kotlin.Long public final fun plus(): kotlin.Long public final fun plus(/*0*/ other: kotlin.Byte): kotlin.Long - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun plus(/*0*/ other: kotlin.Char): kotlin.Long public final fun plus(/*0*/ other: kotlin.Double): kotlin.Double public final fun plus(/*0*/ other: kotlin.Float): kotlin.Float public final fun plus(/*0*/ other: kotlin.Int): kotlin.Long public final fun plus(/*0*/ other: kotlin.Long): kotlin.Long public final fun plus(/*0*/ other: kotlin.Short): kotlin.Long public final fun rangeTo(/*0*/ other: kotlin.Byte): kotlin.LongRange - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun rangeTo(/*0*/ other: kotlin.Char): kotlin.LongRange public final fun rangeTo(/*0*/ other: kotlin.Double): kotlin.DoubleRange public final fun rangeTo(/*0*/ other: kotlin.Float): kotlin.FloatRange public final fun rangeTo(/*0*/ other: kotlin.Int): kotlin.LongRange @@ -917,7 +847,6 @@ public final class Long : kotlin.Number, kotlin.Comparable { public final fun shl(/*0*/ bits: kotlin.Int): kotlin.Long public final fun shr(/*0*/ bits: kotlin.Int): kotlin.Long public final fun times(/*0*/ other: kotlin.Byte): kotlin.Long - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun times(/*0*/ other: kotlin.Char): kotlin.Long public final fun times(/*0*/ other: kotlin.Double): kotlin.Double public final fun times(/*0*/ other: kotlin.Float): kotlin.Float public final fun times(/*0*/ other: kotlin.Int): kotlin.Long @@ -1181,7 +1110,6 @@ public interface Set : kotlin.Collection { public final class Short : kotlin.Number, kotlin.Comparable { /*primary*/ private constructor Short() public final fun compareTo(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun compareTo(/*0*/ other: kotlin.Char): kotlin.Int public final fun compareTo(/*0*/ other: kotlin.Double): kotlin.Int public final fun compareTo(/*0*/ other: kotlin.Float): kotlin.Int public final fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int @@ -1189,7 +1117,6 @@ public final class Short : kotlin.Number, kotlin.Comparable { public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Short): kotlin.Int public final fun dec(): kotlin.Short public final fun div(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun div(/*0*/ other: kotlin.Char): kotlin.Int public final fun div(/*0*/ other: kotlin.Double): kotlin.Double public final fun div(/*0*/ other: kotlin.Float): kotlin.Float public final fun div(/*0*/ other: kotlin.Int): kotlin.Int @@ -1198,14 +1125,12 @@ public final class Short : kotlin.Number, kotlin.Comparable { public final fun inc(): kotlin.Short public final fun minus(): kotlin.Int public final fun minus(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun minus(/*0*/ other: kotlin.Char): kotlin.Int public final fun minus(/*0*/ other: kotlin.Double): kotlin.Double public final fun minus(/*0*/ other: kotlin.Float): kotlin.Float public final fun minus(/*0*/ other: kotlin.Int): kotlin.Int public final fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final fun minus(/*0*/ other: kotlin.Short): kotlin.Int public final fun mod(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun mod(/*0*/ other: kotlin.Char): kotlin.Int public final fun mod(/*0*/ other: kotlin.Double): kotlin.Double public final fun mod(/*0*/ other: kotlin.Float): kotlin.Float public final fun mod(/*0*/ other: kotlin.Int): kotlin.Int @@ -1213,21 +1138,18 @@ public final class Short : kotlin.Number, kotlin.Comparable { public final fun mod(/*0*/ other: kotlin.Short): kotlin.Int public final fun plus(): kotlin.Int public final fun plus(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun plus(/*0*/ other: kotlin.Char): kotlin.Int public final fun plus(/*0*/ other: kotlin.Double): kotlin.Double public final fun plus(/*0*/ other: kotlin.Float): kotlin.Float public final fun plus(/*0*/ other: kotlin.Int): kotlin.Int public final fun plus(/*0*/ other: kotlin.Long): kotlin.Long public final fun plus(/*0*/ other: kotlin.Short): kotlin.Int public final fun rangeTo(/*0*/ other: kotlin.Byte): kotlin.ShortRange - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ShortRange public final fun rangeTo(/*0*/ other: kotlin.Double): kotlin.DoubleRange public final fun rangeTo(/*0*/ other: kotlin.Float): kotlin.FloatRange public final fun rangeTo(/*0*/ other: kotlin.Int): kotlin.IntRange public final fun rangeTo(/*0*/ other: kotlin.Long): kotlin.LongRange public final fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ShortRange public final fun times(/*0*/ other: kotlin.Byte): kotlin.Int - kotlin.deprecated(value = "This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") public final fun times(/*0*/ other: kotlin.Char): kotlin.Int public final fun times(/*0*/ other: kotlin.Double): kotlin.Double public final fun times(/*0*/ other: kotlin.Float): kotlin.Float public final fun times(/*0*/ other: kotlin.Int): kotlin.Int diff --git a/compiler/testData/codegen/box/primitiveTypes/rangeTo.kt b/compiler/testData/codegen/box/primitiveTypes/rangeTo.kt index 089d33c836c..798246e70d3 100644 --- a/compiler/testData/codegen/box/primitiveTypes/rangeTo.kt +++ b/compiler/testData/codegen/box/primitiveTypes/rangeTo.kt @@ -10,9 +10,6 @@ fun box(): String { b.rangeTo(b) b rangeTo b b..b - b.rangeTo(c) - b rangeTo c - b..c b.rangeTo(s) b rangeTo s b..s @@ -36,9 +33,6 @@ fun box(): String { s.rangeTo(b) s rangeTo b s..b - s.rangeTo(c) - s rangeTo c - s..c s.rangeTo(s) s rangeTo s s..s @@ -58,9 +52,6 @@ fun box(): String { i.rangeTo(b) i rangeTo b i..b - i.rangeTo(c) - i rangeTo c - i..c i.rangeTo(s) i rangeTo s i..s @@ -80,9 +71,6 @@ fun box(): String { j.rangeTo(b) j rangeTo b j..b - j.rangeTo(c) - j rangeTo c - j..c j.rangeTo(s) j rangeTo s j..s @@ -102,9 +90,6 @@ fun box(): String { f.rangeTo(b) f rangeTo b f..b - f.rangeTo(c) - f rangeTo c - f..c f.rangeTo(s) f rangeTo s f..s @@ -124,9 +109,6 @@ fun box(): String { d.rangeTo(b) d rangeTo b d..b - d.rangeTo(c) - d rangeTo c - d..c d.rangeTo(s) d rangeTo s d..s @@ -151,7 +133,7 @@ fun main(args: Array) { val s = "bcsijfd" for (i in s) { for (j in s) { - if (i == 'c' && j != 'c') continue + if ((i == 'c') != (j == 'c')) continue println(" $i.rangeTo($j)") println(" $i rangeTo $j") println(" $i..$j") diff --git a/compiler/testData/diagnostics/tests/operatorsOverloading/assignmentOperationsCheckReturnType.kt b/compiler/testData/diagnostics/tests/operatorsOverloading/assignmentOperationsCheckReturnType.kt index 1f29d7de724..209820a1ced 100644 --- a/compiler/testData/diagnostics/tests/operatorsOverloading/assignmentOperationsCheckReturnType.kt +++ b/compiler/testData/diagnostics/tests/operatorsOverloading/assignmentOperationsCheckReturnType.kt @@ -1,12 +1,12 @@ fun intBinEq() { var x = 0 - x += 'a' + x += 'a' x += 1.toByte() x += 1.toShort() x += 1L x += 1f x += 1.0 - x *= 'a' + x *= 'a' x *= 1.toByte() x *= 1.toShort() x *= 1L @@ -16,14 +16,14 @@ fun intBinEq() { fun shortBinEq() { var x = 0.toShort() - x += 'a' + x += 'a' x += 1.toByte() x += 1.toShort() x += 1L x += 1f x += 1.0 - x *= 'a' + x *= 'a' x *= 1.toByte() x *= 1.toShort() x *= 1L diff --git a/compiler/testData/diagnostics/testsWithStdLib/functionLiterals/pseudocodeMemoryOverhead.kt b/compiler/testData/diagnostics/testsWithStdLib/functionLiterals/pseudocodeMemoryOverhead.kt index c4078737066..dc7fce7169e 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/functionLiterals/pseudocodeMemoryOverhead.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/functionLiterals/pseudocodeMemoryOverhead.kt @@ -49,10 +49,8 @@ private val unaryOperations: HashMap, Pair a.toShort() }, emptyUnaryFun), unaryOperation(BYTE, "toByte", { a -> a.toByte() }, emptyUnaryFun), unaryOperation(CHAR, "toInt", { a -> a.toInt() }, emptyUnaryFun), - unaryOperation(CHAR, "minus", { a -> a.minus() }, emptyUnaryFun), unaryOperation(CHAR, "toChar", { a -> a.toChar() }, emptyUnaryFun), unaryOperation(CHAR, "toLong", { a -> a.toLong() }, emptyUnaryFun), - unaryOperation(CHAR, "plus", { a -> a.plus() }, emptyUnaryFun), unaryOperation(CHAR, "toFloat", { a -> a.toFloat() }, emptyUnaryFun), unaryOperation(CHAR, "toDouble", { a -> a.toDouble() }, emptyUnaryFun), unaryOperation(CHAR, "toShort", { a -> a.toShort() }, emptyUnaryFun), @@ -115,110 +113,66 @@ private val binaryOperations: HashMap, Pair a.and(b) }, emptyBinaryFun), binaryOperation(BOOLEAN, BOOLEAN, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(BYTE, BYTE, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), - binaryOperation(BYTE, CHAR, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(BYTE, DOUBLE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(BYTE, FLOAT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(BYTE, INT, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(BYTE, LONG, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(BYTE, SHORT, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(BYTE, BYTE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(BYTE, CHAR, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(BYTE, DOUBLE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(BYTE, FLOAT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(BYTE, INT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(BYTE, LONG, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(BYTE, SHORT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(BYTE, BYTE, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), - binaryOperation(BYTE, CHAR, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(BYTE, DOUBLE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(BYTE, FLOAT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(BYTE, INT, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), binaryOperation(BYTE, LONG, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), binaryOperation(BYTE, SHORT, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), binaryOperation(BYTE, BYTE, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), - binaryOperation(BYTE, CHAR, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(BYTE, DOUBLE, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(BYTE, FLOAT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(BYTE, INT, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(BYTE, LONG, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(BYTE, SHORT, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(BYTE, BYTE, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), - binaryOperation(BYTE, CHAR, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(BYTE, DOUBLE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(BYTE, FLOAT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(BYTE, INT, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(BYTE, LONG, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(BYTE, SHORT, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(BYTE, BYTE, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), - binaryOperation(BYTE, CHAR, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(BYTE, DOUBLE, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(BYTE, FLOAT, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(BYTE, INT, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), binaryOperation(BYTE, LONG, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), binaryOperation(BYTE, SHORT, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), binaryOperation(BYTE, ANY, "equals", { a, b -> a.equals(b) }, emptyBinaryFun), - binaryOperation(CHAR, BYTE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(CHAR, CHAR, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), - binaryOperation(CHAR, DOUBLE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), - binaryOperation(CHAR, FLOAT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), - binaryOperation(CHAR, INT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), - binaryOperation(CHAR, LONG, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), - binaryOperation(CHAR, SHORT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), - binaryOperation(CHAR, BYTE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(CHAR, CHAR, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(CHAR, DOUBLE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(CHAR, FLOAT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(CHAR, INT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(CHAR, LONG, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(CHAR, SHORT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(CHAR, BYTE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), - binaryOperation(CHAR, DOUBLE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), - binaryOperation(CHAR, FLOAT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), + binaryOperation(CHAR, INT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(CHAR, INT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), - binaryOperation(CHAR, LONG, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), - binaryOperation(CHAR, SHORT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), - binaryOperation(CHAR, BYTE, "div", { a, b -> a.div(b) }, emptyBinaryFun), - binaryOperation(CHAR, DOUBLE, "div", { a, b -> a.div(b) }, emptyBinaryFun), - binaryOperation(CHAR, FLOAT, "div", { a, b -> a.div(b) }, emptyBinaryFun), - binaryOperation(CHAR, INT, "div", { a, b -> a.div(b) }, emptyBinaryFun), - binaryOperation(CHAR, LONG, "div", { a, b -> a.div(b) }, emptyBinaryFun), - binaryOperation(CHAR, SHORT, "div", { a, b -> a.div(b) }, emptyBinaryFun), - binaryOperation(CHAR, BYTE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), - binaryOperation(CHAR, DOUBLE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), - binaryOperation(CHAR, FLOAT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), - binaryOperation(CHAR, INT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), - binaryOperation(CHAR, LONG, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), - binaryOperation(CHAR, SHORT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), - binaryOperation(CHAR, BYTE, "times", { a, b -> a.times(b) }, emptyBinaryFun), - binaryOperation(CHAR, DOUBLE, "times", { a, b -> a.times(b) }, emptyBinaryFun), - binaryOperation(CHAR, FLOAT, "times", { a, b -> a.times(b) }, emptyBinaryFun), - binaryOperation(CHAR, INT, "times", { a, b -> a.times(b) }, emptyBinaryFun), - binaryOperation(CHAR, LONG, "times", { a, b -> a.times(b) }, emptyBinaryFun), - binaryOperation(CHAR, SHORT, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(CHAR, ANY, "equals", { a, b -> a.equals(b) }, emptyBinaryFun), binaryOperation(DOUBLE, BYTE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), - binaryOperation(DOUBLE, CHAR, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, DOUBLE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, FLOAT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, INT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, LONG, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, SHORT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, BYTE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(DOUBLE, CHAR, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(DOUBLE, DOUBLE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(DOUBLE, FLOAT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(DOUBLE, INT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(DOUBLE, LONG, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(DOUBLE, SHORT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(DOUBLE, BYTE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), - binaryOperation(DOUBLE, CHAR, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, DOUBLE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, FLOAT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, INT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, LONG, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, SHORT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, BYTE, "div", { a, b -> a.div(b) }, emptyBinaryFun), - binaryOperation(DOUBLE, CHAR, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(DOUBLE, DOUBLE, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(DOUBLE, FLOAT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(DOUBLE, INT, "div", { a, b -> a.div(b) }, emptyBinaryFun), @@ -231,7 +185,6 @@ private val binaryOperations: HashMap, Pair a.mod(b) }, emptyBinaryFun), binaryOperation(DOUBLE, SHORT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(DOUBLE, BYTE, "times", { a, b -> a.times(b) }, emptyBinaryFun), - binaryOperation(DOUBLE, CHAR, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(DOUBLE, DOUBLE, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(DOUBLE, FLOAT, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(DOUBLE, INT, "times", { a, b -> a.times(b) }, emptyBinaryFun), @@ -239,42 +192,36 @@ private val binaryOperations: HashMap, Pair a.times(b) }, emptyBinaryFun), binaryOperation(DOUBLE, ANY, "equals", { a, b -> a.equals(b) }, emptyBinaryFun), binaryOperation(FLOAT, BYTE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), - binaryOperation(FLOAT, CHAR, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(FLOAT, DOUBLE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(FLOAT, FLOAT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(FLOAT, INT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(FLOAT, LONG, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(FLOAT, SHORT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(FLOAT, BYTE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(FLOAT, CHAR, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(FLOAT, DOUBLE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(FLOAT, FLOAT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(FLOAT, INT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(FLOAT, LONG, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(FLOAT, SHORT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(FLOAT, BYTE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), - binaryOperation(FLOAT, CHAR, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(FLOAT, DOUBLE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(FLOAT, FLOAT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(FLOAT, INT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(FLOAT, LONG, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(FLOAT, SHORT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(FLOAT, BYTE, "div", { a, b -> a.div(b) }, emptyBinaryFun), - binaryOperation(FLOAT, CHAR, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(FLOAT, DOUBLE, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(FLOAT, FLOAT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(FLOAT, INT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(FLOAT, LONG, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(FLOAT, SHORT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(FLOAT, BYTE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), - binaryOperation(FLOAT, CHAR, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(FLOAT, DOUBLE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(FLOAT, FLOAT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(FLOAT, INT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(FLOAT, LONG, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(FLOAT, SHORT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(FLOAT, BYTE, "times", { a, b -> a.times(b) }, emptyBinaryFun), - binaryOperation(FLOAT, CHAR, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(FLOAT, DOUBLE, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(FLOAT, FLOAT, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(FLOAT, INT, "times", { a, b -> a.times(b) }, emptyBinaryFun), @@ -282,14 +229,12 @@ private val binaryOperations: HashMap, Pair a.times(b) }, emptyBinaryFun), binaryOperation(FLOAT, ANY, "equals", { a, b -> a.equals(b) }, emptyBinaryFun), binaryOperation(INT, BYTE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(INT, CHAR, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(INT, DOUBLE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(INT, FLOAT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(INT, INT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(INT, LONG, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(INT, SHORT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(INT, BYTE, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), - binaryOperation(INT, CHAR, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(INT, DOUBLE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(INT, FLOAT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(INT, INT, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), @@ -298,7 +243,6 @@ private val binaryOperations: HashMap, Pair a.shl(b) }, emptyBinaryFun), binaryOperation(INT, INT, "ushr", { a, b -> a.ushr(b) }, emptyBinaryFun), binaryOperation(INT, BYTE, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), - binaryOperation(INT, CHAR, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(INT, DOUBLE, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(INT, FLOAT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(INT, INT, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), @@ -306,14 +250,12 @@ private val binaryOperations: HashMap, Pair a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(INT, INT, "shr", { a, b -> a.shr(b) }, emptyBinaryFun), binaryOperation(INT, BYTE, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), - binaryOperation(INT, CHAR, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(INT, DOUBLE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(INT, FLOAT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(INT, INT, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(INT, LONG, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(INT, SHORT, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(INT, BYTE, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), - binaryOperation(INT, CHAR, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(INT, DOUBLE, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(INT, FLOAT, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(INT, INT, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), @@ -321,7 +263,6 @@ private val binaryOperations: HashMap, Pair a.times(b) }, { a, b -> a.multiply(b) }), binaryOperation(INT, INT, "or", { a, b -> a.or(b) }, { a, b -> a.or(b) }), binaryOperation(INT, BYTE, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), - binaryOperation(INT, CHAR, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(INT, DOUBLE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(INT, FLOAT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(INT, INT, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), @@ -331,14 +272,12 @@ private val binaryOperations: HashMap, Pair a.xor(b) }, { a, b -> a.xor(b) }), binaryOperation(INT, ANY, "equals", { a, b -> a.equals(b) }, emptyBinaryFun), binaryOperation(LONG, BYTE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(LONG, CHAR, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(LONG, DOUBLE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(LONG, FLOAT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(LONG, INT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(LONG, LONG, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(LONG, SHORT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(LONG, BYTE, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), - binaryOperation(LONG, CHAR, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(LONG, DOUBLE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(LONG, FLOAT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(LONG, INT, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), @@ -347,7 +286,6 @@ private val binaryOperations: HashMap, Pair a.shl(b) }, emptyBinaryFun), binaryOperation(LONG, INT, "ushr", { a, b -> a.ushr(b) }, emptyBinaryFun), binaryOperation(LONG, BYTE, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), - binaryOperation(LONG, CHAR, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(LONG, DOUBLE, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(LONG, FLOAT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(LONG, INT, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), @@ -355,14 +293,12 @@ private val binaryOperations: HashMap, Pair a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(LONG, INT, "shr", { a, b -> a.shr(b) }, emptyBinaryFun), binaryOperation(LONG, BYTE, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), - binaryOperation(LONG, CHAR, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(LONG, DOUBLE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(LONG, FLOAT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(LONG, INT, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(LONG, LONG, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(LONG, SHORT, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(LONG, BYTE, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), - binaryOperation(LONG, CHAR, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(LONG, DOUBLE, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(LONG, FLOAT, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(LONG, INT, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), @@ -370,7 +306,6 @@ private val binaryOperations: HashMap, Pair a.times(b) }, { a, b -> a.multiply(b) }), binaryOperation(LONG, LONG, "or", { a, b -> a.or(b) }, { a, b -> a.or(b) }), binaryOperation(LONG, BYTE, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), - binaryOperation(LONG, CHAR, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(LONG, DOUBLE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(LONG, FLOAT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(LONG, INT, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), @@ -380,42 +315,36 @@ private val binaryOperations: HashMap, Pair a.xor(b) }, { a, b -> a.xor(b) }), binaryOperation(LONG, ANY, "equals", { a, b -> a.equals(b) }, emptyBinaryFun), binaryOperation(SHORT, BYTE, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), - binaryOperation(SHORT, CHAR, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(SHORT, DOUBLE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(SHORT, FLOAT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(SHORT, INT, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(SHORT, LONG, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(SHORT, SHORT, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(SHORT, BYTE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(SHORT, CHAR, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(SHORT, DOUBLE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(SHORT, FLOAT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(SHORT, INT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(SHORT, LONG, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(SHORT, SHORT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(SHORT, BYTE, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), - binaryOperation(SHORT, CHAR, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(SHORT, DOUBLE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(SHORT, FLOAT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(SHORT, INT, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), binaryOperation(SHORT, LONG, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), binaryOperation(SHORT, SHORT, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), binaryOperation(SHORT, BYTE, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), - binaryOperation(SHORT, CHAR, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(SHORT, DOUBLE, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(SHORT, FLOAT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(SHORT, INT, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(SHORT, LONG, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(SHORT, SHORT, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(SHORT, BYTE, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), - binaryOperation(SHORT, CHAR, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(SHORT, DOUBLE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(SHORT, FLOAT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(SHORT, INT, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(SHORT, LONG, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(SHORT, SHORT, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(SHORT, BYTE, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), - binaryOperation(SHORT, CHAR, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(SHORT, DOUBLE, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(SHORT, FLOAT, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(SHORT, INT, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/unaryMinus.kt b/compiler/testData/resolveAnnotations/parameters/expressions/unaryMinus.kt index b318960bcb6..d2203adca7b 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/unaryMinus.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/unaryMinus.kt @@ -6,10 +6,9 @@ annotation class Ann( val b3: Int, val b4: Long, val b5: Double, - val b6: Float, - val b7: Char + val b6: Float ) -Ann(-1, -1, -1, -1, -1.0, -1.0.toFloat(), -'c') class MyClass +Ann(-1, -1, -1, -1, -1.0, -1.0.toFloat()) class MyClass -// EXPECTED: Ann(b1 = IntegerValueType(-1), b2 = IntegerValueType(-1), b3 = IntegerValueType(-1), b4 = IntegerValueType(-1), b5 = -1.0.toDouble(), b6 = -1.0.toFloat(), b7 = IntegerValueType(-99)) +// EXPECTED: Ann(b1 = IntegerValueType(-1), b2 = IntegerValueType(-1), b3 = IntegerValueType(-1), b4 = IntegerValueType(-1), b5 = -1.0.toDouble(), b6 = -1.0.toFloat()) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/unaryPlus.kt b/compiler/testData/resolveAnnotations/parameters/expressions/unaryPlus.kt index c0751b02203..5d519646817 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/unaryPlus.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/unaryPlus.kt @@ -6,10 +6,9 @@ annotation class Ann( val b3: Int, val b4: Long, val b5: Double, - val b6: Float, - val b7: Char + val b6: Float ) -Ann(+1, +1, +1, +1, +1.0, +1.0.toFloat(), +'c') class MyClass +Ann(+1, +1, +1, +1, +1.0, +1.0.toFloat()) class MyClass -// EXPECTED: Ann(b1 = IntegerValueType(1), b2 = IntegerValueType(1), b3 = IntegerValueType(1), b4 = IntegerValueType(1), b5 = 1.0.toDouble(), b6 = 1.0.toFloat(), b7 = IntegerValueType(99)) +// EXPECTED: Ann(b1 = IntegerValueType(1), b2 = IntegerValueType(1), b3 = IntegerValueType(1), b4 = IntegerValueType(1), b5 = 1.0.toDouble(), b6 = 1.0.toFloat()) diff --git a/compiler/tests/org/jetbrains/kotlin/types/JetTypeCheckerTest.java b/compiler/tests/org/jetbrains/kotlin/types/JetTypeCheckerTest.java index a00efd960a8..49afde88c79 100644 --- a/compiler/tests/org/jetbrains/kotlin/types/JetTypeCheckerTest.java +++ b/compiler/tests/org/jetbrains/kotlin/types/JetTypeCheckerTest.java @@ -434,9 +434,6 @@ public class JetTypeCheckerTest extends JetLiteFixture { assertType("1.plus(1.toLong())", "Long"); assertType("1.plus(1)", "Int"); - assertType("'1'.plus(1.toDouble())", "Double"); - assertType("'1'.plus(1.toFloat())", "Float"); - assertType("'1'.plus(1.toLong())", "Long"); assertType("'1'.plus(1)", "Int"); assertType("'1'.minus('1')", "Int"); // Plus is not available for char diff --git a/js/js.translator/testData/char/cases/charBinaryOperations.kt b/js/js.translator/testData/char/cases/charBinaryOperations.kt index f774fd69cc1..2845cf16db8 100644 --- a/js/js.translator/testData/char/cases/charBinaryOperations.kt +++ b/js/js.translator/testData/char/cases/charBinaryOperations.kt @@ -2,76 +2,10 @@ package foo fun box(): String { - assertEquals(75, 10 + 'A') - assertEquals(75, (10: Short) + 'A') - assertEquals(75, (10: Byte) + 'A') - assertEquals(75.0, 10.0 + 'A') - assertEquals(75.0, 10.0f + 'A') - assertEquals(75L, 10L + 'A') - assertEquals(75, 'A' + 10) - assertEquals(75, 'A' + (10: Short)) - assertEquals(75, 'A' + (10: Byte)) - assertEquals(75.0, 'A' + 10.0) - assertEquals(75.0, 'A' + 10.0f) - assertEquals(75L, 'A' + 10L) - - assertEquals(-55, 10 - 'A') - assertEquals(-55, (10: Short) - 'A') - assertEquals(-55, (10: Byte) - 'A') - assertEquals(-55.0, 10.0 - 'A') - assertEquals(-55.0, 10.0f - 'A') - assertEquals(-55L, 10L - 'A') - assertEquals(55, 'A' - 10) - assertEquals(55, 'A' - (10: Short)) - assertEquals(55, 'A' - (10: Byte)) - assertEquals(55.0, 'A' - 10.0) - assertEquals(55.0, 'A' - 10.0f) - assertEquals(55L, 'A' - 10L) - assertEquals(650, 10 * 'A') - assertEquals(650, (10: Short) * 'A') - assertEquals(650, (10: Byte) * 'A') - assertEquals(650.0, 10.0 * 'A') - assertEquals(650.0, 10.0f * 'A') - assertEquals(650L, 10L * 'A') - - assertEquals(650, 'A' * 10) - assertEquals(650, 'A' * (10: Short)) - assertEquals(650, 'A' * (10: Byte)) - assertEquals(650.0, 'A' * 10.0) - assertEquals(650.0, 'A' * 10.0f) - assertEquals(650L, 'A' * 10L) - - assertEquals(1, 100 / 'A') - assertEquals(1, (100: Short) / 'A') - assertEquals(1, (100: Byte) / 'A') - assertEquals(100.0 / 65.0, 100.0 / 'A') - assertEquals(100.0 / 65.0, 100.0f / 'A') - assertEquals(1L, 100L / 'A') - - assertEquals(6, 'A' / 10) - assertEquals(6, 'A' / (10: Short)) - assertEquals(6, 'A' / (10: Byte)) - assertEquals(6.5, 'A' / 10.0) - assertEquals(6.5, 'A' / 10.0f) - assertEquals(6L, 'A' / 10L) - - assertEquals(35, 100 % 'A') - assertEquals(35, (100: Short) % 'A') - assertEquals(35, (100: Byte) % 'A') - // TODO Uncomment when KT-5860 (Double.mod(Char) is absent) will be fixed - //assertEquals(35.0, 100.0 % 'A') - assertEquals(35.0, 100.0f % 'A') - assertEquals(35L, 100L % 'A') - - assertEquals(5, 'A' % 10) - assertEquals(5, 'A' % (10: Short)) - assertEquals(5, 'A' % (10: Byte)) - assertEquals(5.0, 'A' % 10.0) - assertEquals(5.0, 'A' % 10.0f) - assertEquals(5L, 'A' % 10L) + assertEquals(4, '4' - '0') return "OK" } \ No newline at end of file diff --git a/js/js.translator/testData/char/cases/charCompareToIntrinsic.kt b/js/js.translator/testData/char/cases/charCompareToIntrinsic.kt index 481a557fe74..945a97fab91 100644 --- a/js/js.translator/testData/char/cases/charCompareToIntrinsic.kt +++ b/js/js.translator/testData/char/cases/charCompareToIntrinsic.kt @@ -2,19 +2,10 @@ package foo fun box(): String { - assertEquals(true, 64 < 'A') - assertEquals(true, (64: Short) < 'A') - assertEquals(true, (64: Byte) < 'A') - assertEquals(true, 64L < 'A') - assertEquals(true, 64.0 < 'A') - assertEquals(true, 64.0f < 'A') - - assertEquals(true, 'A' > 64) - assertEquals(true, 'A' > (64: Short)) - assertEquals(true, 'A' > (64: Byte)) - assertEquals(true, 'A' > 64L) - assertEquals(true, 'A' > 64.0) - assertEquals(true, 'A' > 64.0f) + assertEquals(true, 'A' < '\uFFFF') + assertEquals(true, 'A' > '\u0000') + assertEquals(true, 'A' <= '\u0041') + assertEquals(true, 'A' >= '\u0041') return "OK" } \ No newline at end of file diff --git a/js/js.translator/testData/char/cases/charUnaryOperations.kt b/js/js.translator/testData/char/cases/charUnaryOperations.kt index e73f8baaca2..38489196be2 100644 --- a/js/js.translator/testData/char/cases/charUnaryOperations.kt +++ b/js/js.translator/testData/char/cases/charUnaryOperations.kt @@ -21,9 +21,5 @@ fun box(): String { --x assertEquals('C', x) - assertEquals(67, +x) - assertEquals(-67, -x) - - return "OK" } \ No newline at end of file diff --git a/js/js.translator/testData/number/cases/numberCompareTo.kt b/js/js.translator/testData/number/cases/numberCompareTo.kt index 82e9fc17a53..9507a39d539 100644 --- a/js/js.translator/testData/number/cases/numberCompareTo.kt +++ b/js/js.translator/testData/number/cases/numberCompareTo.kt @@ -19,7 +19,6 @@ fun box(): String { assertEquals(-1, 1 compareTo (2:Byte)) assertEquals(-1, 1 compareTo 2.0) assertEquals(-1, 1 compareTo 2.0f) - assertEquals(-1, 1 compareTo 'A') assertEquals(1, 10 compareTo 2L) assertEquals(1, 10 compareTo 2) @@ -43,7 +42,6 @@ fun box(): String { assertEquals(-1, (1: Short) compareTo (2:Byte)) assertEquals(-1, (1: Short) compareTo 2.0) assertEquals(-1, (1: Short) compareTo 2.0f) - assertEquals(-1, (1: Short) compareTo 'A') assertEquals(1, (10: Byte) compareTo 2L) assertEquals(-1, (10: Byte) compareTo 7540113804746346429L) @@ -53,7 +51,6 @@ fun box(): String { assertEquals(1, ((10: Byte): Comparable) compareTo (2:Byte)) assertEquals(1, (10: Byte) compareTo 2.0) assertEquals(1, (10: Byte) compareTo 2.0f) - assertEquals(-1, (10: Byte) compareTo 'A') assertEquals(0, 2.0 compareTo 2L) assertEquals(-1, 2.0 compareTo 7540113804746346429L) @@ -63,7 +60,6 @@ fun box(): String { assertEquals(0, 2.0 compareTo 2.0) assertEquals(0, (2.0: Comparable) compareTo 2.0) assertEquals(0, 2.0 compareTo 2.0f) - assertEquals(-1, 2.0 compareTo 'A') assertEquals(1, 3.0f compareTo 2L) assertEquals(-1, 3.0f compareTo 7540113804746346429L) @@ -72,7 +68,6 @@ fun box(): String { assertEquals(1, 3.0f compareTo (2:Byte)) assertEquals(1, 3.0f compareTo 2.0) assertEquals(1, 3.0f compareTo 2.0f) - assertEquals(-1, 3.0f compareTo 'A') assertEquals(1, (3.0f: Comparable) compareTo 2.0f) assertEquals(1, 10L compareTo 2L) @@ -83,15 +78,7 @@ fun box(): String { assertEquals(1, 10L compareTo (2:Byte)) assertEquals(1, 10L compareTo 2.0) assertEquals(1, 10L compareTo 2.0f) - assertEquals(-1, 10L compareTo 'A') - assertEquals(-1, 'A' compareTo 200L) - assertEquals(-1, 'A' compareTo 7540113804746346429L) - assertEquals(1, 'A' compareTo 2) - assertEquals(1, 'A' compareTo (2:Short)) - assertEquals(1, 'A' compareTo (2:Byte)) - assertEquals(1, 'A' compareTo 2.0) - assertEquals(1, 'A' compareTo 2.0f) assertEquals(0, 'A' compareTo 'A') assertEquals(-1, 1L compareTo 2L)