From 62ac91a12137a4ad69f05afc2ff196de9038057f Mon Sep 17 00:00:00 2001 From: Mikhail Zarechenskiy Date: Tue, 13 Dec 2016 20:55:40 +0300 Subject: [PATCH] Add operator 'rem' to builtIns Also deprecate operator 'mod' --- .../builtin-classes/default/kotlin.txt | 108 ++++++++----- .../testData/builtin-classes/java6/kotlin.txt | 108 ++++++++----- .../testData/builtin-classes/java8/kotlin.txt | 108 ++++++++----- .../builtin-classes/newMethods/kotlin.txt | 108 ++++++++----- .../testData/ir/irCfg/loop/digitCount.txt | 2 +- compiler/testData/ir/irCfg/loop/isPerfect.txt | 2 +- .../expressions/augmentedAssignment1.txt | 4 +- .../ir/irText/expressions/simpleOperators.txt | 2 +- core/builtins/native/kotlin/Primitives.kt | 150 ++++++++++++++++++ .../kotlin/generators/builtins/primitives.kt | 14 +- 10 files changed, 455 insertions(+), 151 deletions(-) diff --git a/compiler/testData/builtin-classes/default/kotlin.txt b/compiler/testData/builtin-classes/default/kotlin.txt index 83fef9ceb67..ecb2d82f215 100644 --- a/compiler/testData/builtin-classes/default/kotlin.txt +++ b/compiler/testData/builtin-classes/default/kotlin.txt @@ -75,12 +75,12 @@ public final class Byte : kotlin.Number, kotlin.Comparable { public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Int public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int @kotlin.SinceKotlin(version = "1.1") public final infix fun or(/*0*/ other: kotlin.Byte): kotlin.Byte public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double @@ -92,6 +92,12 @@ public final class Byte : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Float): kotlin.Float @@ -235,18 +241,24 @@ public final class Double : kotlin.Number, kotlin.Comparable { public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Double public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Double public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Float): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Long): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Short): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Float): kotlin.Double @@ -332,18 +344,24 @@ public final class Float : kotlin.Number, kotlin.Comparable { public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Float public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Float public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Float): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Long): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Short): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Float public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Float public final operator fun times(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Float): kotlin.Float @@ -412,12 +430,12 @@ public final class Int : kotlin.Number, kotlin.Comparable { public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Int public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int public final infix fun or(/*0*/ other: kotlin.Int): kotlin.Int public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double @@ -429,6 +447,12 @@ public final class Int : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Int public final infix fun shl(/*0*/ bitCount: kotlin.Int): kotlin.Int public final infix fun shr(/*0*/ bitCount: kotlin.Int): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Int @@ -492,12 +516,12 @@ public final class Long : kotlin.Number, kotlin.Comparable { public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Long public final infix fun or(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Long public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double @@ -509,6 +533,12 @@ public final class Long : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Long public final infix fun shl(/*0*/ bitCount: kotlin.Int): kotlin.Long public final infix fun shr(/*0*/ bitCount: kotlin.Int): kotlin.Long public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Long @@ -605,12 +635,12 @@ public final class Short : kotlin.Number, kotlin.Comparable { public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Int public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int @kotlin.SinceKotlin(version = "1.1") public final infix fun or(/*0*/ other: kotlin.Short): kotlin.Short public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double @@ -622,6 +652,12 @@ public final class Short : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Float): kotlin.Float diff --git a/compiler/testData/builtin-classes/java6/kotlin.txt b/compiler/testData/builtin-classes/java6/kotlin.txt index 3177782ef40..3b4ae541e81 100644 --- a/compiler/testData/builtin-classes/java6/kotlin.txt +++ b/compiler/testData/builtin-classes/java6/kotlin.txt @@ -77,12 +77,12 @@ public final class Byte : kotlin.Number, kotlin.Comparable, java.io public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Int public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int @kotlin.SinceKotlin(version = "1.1") public final infix fun or(/*0*/ other: kotlin.Byte): kotlin.Byte public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double @@ -94,6 +94,12 @@ public final class Byte : kotlin.Number, kotlin.Comparable, java.io public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Float): kotlin.Float @@ -245,18 +251,24 @@ public final class Double : kotlin.Number, kotlin.Comparable, jav public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Double public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Double public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Float): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Long): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Short): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Float): kotlin.Double @@ -345,18 +357,24 @@ public final class Float : kotlin.Number, kotlin.Comparable, java. public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Float public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Float public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Float): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Long): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Short): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Float public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Float public final operator fun times(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Float): kotlin.Float @@ -426,12 +444,12 @@ public final class Int : kotlin.Number, kotlin.Comparable, java.io.S public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Int public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int public final infix fun or(/*0*/ other: kotlin.Int): kotlin.Int public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double @@ -443,6 +461,12 @@ public final class Int : kotlin.Number, kotlin.Comparable, java.io.S public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Int public final infix fun shl(/*0*/ bitCount: kotlin.Int): kotlin.Int public final infix fun shr(/*0*/ bitCount: kotlin.Int): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Int @@ -507,12 +531,12 @@ public final class Long : kotlin.Number, kotlin.Comparable, java.io public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Long public final infix fun or(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Long public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double @@ -524,6 +548,12 @@ public final class Long : kotlin.Number, kotlin.Comparable, java.io public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Long public final infix fun shl(/*0*/ bitCount: kotlin.Int): kotlin.Long public final infix fun shr(/*0*/ bitCount: kotlin.Int): kotlin.Long public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Long @@ -621,12 +651,12 @@ public final class Short : kotlin.Number, kotlin.Comparable, java. public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Int public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int @kotlin.SinceKotlin(version = "1.1") public final infix fun or(/*0*/ other: kotlin.Short): kotlin.Short public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double @@ -638,6 +668,12 @@ public final class Short : kotlin.Number, kotlin.Comparable, java. public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Float): kotlin.Float diff --git a/compiler/testData/builtin-classes/java8/kotlin.txt b/compiler/testData/builtin-classes/java8/kotlin.txt index 5062b72a13a..e7e3e612c71 100644 --- a/compiler/testData/builtin-classes/java8/kotlin.txt +++ b/compiler/testData/builtin-classes/java8/kotlin.txt @@ -77,12 +77,12 @@ public final class Byte : kotlin.Number, kotlin.Comparable, java.io public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Int public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int @kotlin.SinceKotlin(version = "1.1") public final infix fun or(/*0*/ other: kotlin.Byte): kotlin.Byte public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double @@ -94,6 +94,12 @@ public final class Byte : kotlin.Number, kotlin.Comparable, java.io public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Float): kotlin.Float @@ -247,18 +253,24 @@ public final class Double : kotlin.Number, kotlin.Comparable, jav public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Double public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Double public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Float): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Long): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Short): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Float): kotlin.Double @@ -347,18 +359,24 @@ public final class Float : kotlin.Number, kotlin.Comparable, java. public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Float public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Float public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Float): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Long): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Short): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Float public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Float public final operator fun times(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Float): kotlin.Float @@ -428,12 +446,12 @@ public final class Int : kotlin.Number, kotlin.Comparable, java.io.S public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Int public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int public final infix fun or(/*0*/ other: kotlin.Int): kotlin.Int public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double @@ -445,6 +463,12 @@ public final class Int : kotlin.Number, kotlin.Comparable, java.io.S public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Int public final infix fun shl(/*0*/ bitCount: kotlin.Int): kotlin.Int public final infix fun shr(/*0*/ bitCount: kotlin.Int): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Int @@ -509,12 +533,12 @@ public final class Long : kotlin.Number, kotlin.Comparable, java.io public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Long public final infix fun or(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Long public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double @@ -526,6 +550,12 @@ public final class Long : kotlin.Number, kotlin.Comparable, java.io public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Long public final infix fun shl(/*0*/ bitCount: kotlin.Int): kotlin.Long public final infix fun shr(/*0*/ bitCount: kotlin.Int): kotlin.Long public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Long @@ -623,12 +653,12 @@ public final class Short : kotlin.Number, kotlin.Comparable, java. public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Int public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int @kotlin.SinceKotlin(version = "1.1") public final infix fun or(/*0*/ other: kotlin.Short): kotlin.Short public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double @@ -640,6 +670,12 @@ public final class Short : kotlin.Number, kotlin.Comparable, java. public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Float): kotlin.Float diff --git a/compiler/testData/builtin-classes/newMethods/kotlin.txt b/compiler/testData/builtin-classes/newMethods/kotlin.txt index fd27306bde8..8df339eff19 100644 --- a/compiler/testData/builtin-classes/newMethods/kotlin.txt +++ b/compiler/testData/builtin-classes/newMethods/kotlin.txt @@ -77,12 +77,12 @@ public final class Byte : kotlin.Number, kotlin.Comparable, java.io public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Int public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int @kotlin.SinceKotlin(version = "1.1") public final infix fun or(/*0*/ other: kotlin.Byte): kotlin.Byte public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double @@ -94,6 +94,12 @@ public final class Byte : kotlin.Number, kotlin.Comparable, java.io public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Float): kotlin.Float @@ -245,18 +251,24 @@ public final class Double : kotlin.Number, kotlin.Comparable, jav public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Double public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Double public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Float): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Long): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Short): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Float): kotlin.Double @@ -345,18 +357,24 @@ public final class Float : kotlin.Number, kotlin.Comparable, java. public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Float public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Float public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun plus(/*0*/ other: kotlin.Float): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Long): kotlin.Float public final operator fun plus(/*0*/ other: kotlin.Short): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Float public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Float public final operator fun times(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Float): kotlin.Float @@ -426,12 +444,12 @@ public final class Int : kotlin.Number, kotlin.Comparable, java.io.S public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Int public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int public final infix fun or(/*0*/ other: kotlin.Int): kotlin.Int public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double @@ -443,6 +461,12 @@ public final class Int : kotlin.Number, kotlin.Comparable, java.io.S public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Int public final infix fun shl(/*0*/ bitCount: kotlin.Int): kotlin.Int public final infix fun shr(/*0*/ bitCount: kotlin.Int): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Int @@ -507,12 +531,12 @@ public final class Long : kotlin.Number, kotlin.Comparable, java.io public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Long public final infix fun or(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Long public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double @@ -524,6 +548,12 @@ public final class Long : kotlin.Number, kotlin.Comparable, java.io public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Long public final infix fun shl(/*0*/ bitCount: kotlin.Int): kotlin.Long public final infix fun shr(/*0*/ bitCount: kotlin.Int): kotlin.Long public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Long @@ -621,12 +651,12 @@ public final class Short : kotlin.Number, kotlin.Comparable, java. public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Int public final operator fun minus(/*0*/ other: kotlin.Long): kotlin.Long public final operator fun minus(/*0*/ other: kotlin.Short): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double - public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float - public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int - public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long - public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "Use rem(other) instead", replaceWith = kotlin.ReplaceWith(expression = "rem(other)", imports = {})) public final operator fun mod(/*0*/ other: kotlin.Short): kotlin.Int @kotlin.SinceKotlin(version = "1.1") public final infix fun or(/*0*/ other: kotlin.Short): kotlin.Short public final operator fun plus(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun plus(/*0*/ other: kotlin.Double): kotlin.Double @@ -638,6 +668,12 @@ public final class Short : kotlin.Number, kotlin.Comparable, java. public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Int): kotlin.Int + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Long): kotlin.Long + @kotlin.SinceKotlin(version = "1.1") public final operator fun rem(/*0*/ other: kotlin.Short): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Byte): kotlin.Int public final operator fun times(/*0*/ other: kotlin.Double): kotlin.Double public final operator fun times(/*0*/ other: kotlin.Float): kotlin.Float diff --git a/compiler/testData/ir/irCfg/loop/digitCount.txt b/compiler/testData/ir/irCfg/loop/digitCount.txt index e1d16d701fb..9b22e08d98c 100644 --- a/compiler/testData/ir/irCfg/loop/digitCount.txt +++ b/compiler/testData/ir/irCfg/loop/digitCount.txt @@ -18,7 +18,7 @@ CONTENT 2 GET_VAR 'value-parameter m: Int' type=kotlin.Int origin=null 3 GET_VAR 'number: Int' type=kotlin.Int origin=null 4 CONST Int type=kotlin.Int value='10' - 5 CALL 'mod(Int): Int' type=kotlin.Int origin=PERC + 5 CALL 'rem(Int): Int' type=kotlin.Int origin=PERC OUTGOING -> BB 2 CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ BB 2 diff --git a/compiler/testData/ir/irCfg/loop/isPerfect.txt b/compiler/testData/ir/irCfg/loop/isPerfect.txt index 54c19f063fb..8514e545c85 100644 --- a/compiler/testData/ir/irCfg/loop/isPerfect.txt +++ b/compiler/testData/ir/irCfg/loop/isPerfect.txt @@ -32,7 +32,7 @@ CONTENT 4 WHEN type=kotlin.Unit origin=null 5 GET_VAR 'value-parameter n: Int' type=kotlin.Int origin=null 6 GET_VAR 'm: Int' type=kotlin.Int origin=null - 7 CALL 'mod(Int): Int' type=kotlin.Int origin=PERC + 7 CALL 'rem(Int): Int' type=kotlin.Int origin=PERC 8 CONST Int type=kotlin.Int value='0' 9 CALL 'compareTo(Int): Int' type=kotlin.Int origin=GT OUTGOING -> BB 3, 4 diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignment1.txt b/compiler/testData/ir/irText/expressions/augmentedAssignment1.txt index 84a63f2f172..5f3f20251a4 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignment1.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignment1.txt @@ -32,7 +32,7 @@ FILE /augmentedAssignment1.kt $this: GET_VAR 'x: Int' type=kotlin.Int origin=DIVEQ other: CONST Int type=kotlin.Int value='4' SET_VAR 'x: Int' type=kotlin.Unit origin=PERCEQ - CALL 'mod(Int): Int' type=kotlin.Int origin=PERCEQ + CALL 'rem(Int): Int' type=kotlin.Int origin=PERCEQ $this: GET_VAR 'x: Int' type=kotlin.Int origin=PERCEQ other: CONST Int type=kotlin.Int value='5' FUN public fun testProperty(): kotlin.Unit @@ -59,6 +59,6 @@ FILE /augmentedAssignment1.kt other: CONST Int type=kotlin.Int value='4' BLOCK type=kotlin.Unit origin=PERCEQ CALL '(Int): Unit' type=kotlin.Unit origin=PERCEQ - : CALL 'mod(Int): Int' type=kotlin.Int origin=PERCEQ + : CALL 'rem(Int): Int' type=kotlin.Int origin=PERCEQ $this: CALL '(): Int' type=kotlin.Int origin=PERCEQ other: CONST Int type=kotlin.Int value='5' diff --git a/compiler/testData/ir/irText/expressions/simpleOperators.txt b/compiler/testData/ir/irText/expressions/simpleOperators.txt index 463b42bff67..88b59070266 100644 --- a/compiler/testData/ir/irText/expressions/simpleOperators.txt +++ b/compiler/testData/ir/irText/expressions/simpleOperators.txt @@ -26,7 +26,7 @@ FILE /simpleOperators.kt FUN public fun test5(a: kotlin.Int, b: kotlin.Int): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='test5(Int, Int): Int' - CALL 'mod(Int): Int' type=kotlin.Int origin=PERC + CALL 'rem(Int): Int' type=kotlin.Int origin=PERC $this: GET_VAR 'value-parameter a: Int' type=kotlin.Int origin=null other: GET_VAR 'value-parameter b: Int' type=kotlin.Int origin=null FUN public fun test6(a: kotlin.Int, b: kotlin.Int): kotlin.ranges.IntRange diff --git a/core/builtins/native/kotlin/Primitives.kt b/core/builtins/native/kotlin/Primitives.kt index 8d0a9d88c53..3e28e97b607 100644 --- a/core/builtins/native/kotlin/Primitives.kt +++ b/core/builtins/native/kotlin/Primitives.kt @@ -130,18 +130,43 @@ public class Byte private constructor() : Number(), Comparable { public operator fun div(other: Double): Double /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Byte): Int /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Short): Int /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Int): Int /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Long): Long /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Float): Float /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Double): Double + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Byte): Int + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Short): Int + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Int): Int + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Long): Long + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Float): Float + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Double): Double + /** Increments this value. */ public operator fun inc(): Byte /** Decrements this value. */ @@ -294,18 +319,43 @@ public class Short private constructor() : Number(), Comparable { public operator fun div(other: Double): Double /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Byte): Int /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Short): Int /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Int): Int /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Long): Long /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Float): Float /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Double): Double + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Byte): Int + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Short): Int + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Int): Int + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Long): Long + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Float): Float + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Double): Double + /** Increments this value. */ public operator fun inc(): Short /** Decrements this value. */ @@ -458,18 +508,43 @@ public class Int private constructor() : Number(), Comparable { public operator fun div(other: Double): Double /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Byte): Int /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Short): Int /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Int): Int /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Long): Long /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Float): Float /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Double): Double + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Byte): Int + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Short): Int + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Int): Int + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Long): Long + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Float): Float + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Double): Double + /** Increments this value. */ public operator fun inc(): Int /** Decrements this value. */ @@ -624,18 +699,43 @@ public class Long private constructor() : Number(), Comparable { public operator fun div(other: Double): Double /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Byte): Long /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Short): Long /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Int): Long /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Long): Long /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Float): Float /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Double): Double + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Byte): Long + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Short): Long + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Int): Long + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Long): Long + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Float): Float + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Double): Double + /** Increments this value. */ public operator fun inc(): Long /** Decrements this value. */ @@ -805,18 +905,43 @@ public class Float private constructor() : Number(), Comparable { public operator fun div(other: Double): Double /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Byte): Float /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Short): Float /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Int): Float /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Long): Float /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Float): Float /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Double): Double + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Byte): Float + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Short): Float + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Int): Float + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Long): Float + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Float): Float + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Double): Double + /** Increments this value. */ public operator fun inc(): Float /** Decrements this value. */ @@ -963,18 +1088,43 @@ public class Double private constructor() : Number(), Comparable { public operator fun div(other: Double): Double /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Byte): Double /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Short): Double /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Int): Double /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Long): Double /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Float): Double /** Calculates the remainder of dividing this value by the other value. */ + @Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING) public operator fun mod(other: Double): Double + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Byte): Double + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Short): Double + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Int): Double + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Long): Double + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Float): Double + /** Calculates the remainder of dividing this value by the other value. */ + @SinceKotlin("1.1") + public operator fun rem(other: Double): Double + /** Increments this value. */ public operator fun inc(): Double /** Decrements this value. */ diff --git a/generators/src/org/jetbrains/kotlin/generators/builtins/primitives.kt b/generators/src/org/jetbrains/kotlin/generators/builtins/primitives.kt index 6487f424aa9..68cf82f3413 100644 --- a/generators/src/org/jetbrains/kotlin/generators/builtins/primitives.kt +++ b/generators/src/org/jetbrains/kotlin/generators/builtins/primitives.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ package org.jetbrains.kotlin.generators.builtins.ranges import org.jetbrains.kotlin.generators.builtins.PrimitiveType import org.jetbrains.kotlin.generators.builtins.generateBuiltIns.BuiltInsSourceGenerator +import org.jetbrains.kotlin.util.OperatorNameConventions import java.io.PrintWriter class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) { @@ -26,7 +27,8 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) { "minus" to "Subtracts the other value from this value.", "times" to "Multiplies this value by the other value.", "div" to "Divides this value by the other value.", - "mod" to "Calculates the remainder of dividing this value by the other value." + "mod" to "Calculates the remainder of dividing this value by the other value.", + "rem" to "Calculates the remainder of dividing this value by the other value." ) private val unaryOperators: Map = mapOf( "inc" to "Increments this value.", @@ -162,7 +164,15 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) { private fun generateOperator(name: String, doc: String, thisKind: PrimitiveType) { for (otherKind in PrimitiveType.onlyNumeric) { val returnType = getOperatorReturnType(thisKind, otherKind) + out.println(" /** $doc */") + when (name) { + OperatorNameConventions.REM.asString() -> + out.println(" @SinceKotlin(\"1.1\")") + + OperatorNameConventions.MOD.asString() -> + out.println(" @Deprecated(\"Use rem(other) instead\", ReplaceWith(\"rem(other)\"), DeprecationLevel.WARNING)") + } out.println(" public operator fun $name(other: ${otherKind.capitalized}): ${returnType.capitalized}") } out.println()