diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/constants/evaluate/OperationsMapGenerated.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/constants/evaluate/OperationsMapGenerated.kt index 6b8824c4241..8febef7e49b 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/constants/evaluate/OperationsMapGenerated.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/constants/evaluate/OperationsMapGenerated.kt @@ -38,8 +38,6 @@ private val unaryOperations: HashMap, Pair a.toLong() }, emptyUnaryFun), unaryOperation(BYTE, "toShort", { a -> a.toShort() }, emptyUnaryFun), unaryOperation(BYTE, "toString", { a -> a.toString() }, emptyUnaryFun), - unaryOperation(CHAR, "minus", { a -> a.minus() }, emptyUnaryFun), - unaryOperation(CHAR, "plus", { a -> a.plus() }, emptyUnaryFun), unaryOperation(CHAR, "toByte", { a -> a.toByte() }, emptyUnaryFun), unaryOperation(CHAR, "toChar", { a -> a.toChar() }, emptyUnaryFun), unaryOperation(CHAR, "toDouble", { a -> a.toDouble() }, emptyUnaryFun), @@ -112,124 +110,78 @@ private val binaryOperations: HashMap, Pair a.xor(b) }, emptyBinaryFun), binaryOperation(BOOLEAN, ANY, "equals", { a, b -> a.equals(b) }, emptyBinaryFun), binaryOperation(BYTE, BYTE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(BYTE, CHAR, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(BYTE, DOUBLE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(BYTE, FLOAT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(BYTE, INT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(BYTE, LONG, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(BYTE, SHORT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(BYTE, BYTE, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), - binaryOperation(BYTE, CHAR, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(BYTE, DOUBLE, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(BYTE, FLOAT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(BYTE, INT, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(BYTE, LONG, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(BYTE, SHORT, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(BYTE, BYTE, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), - binaryOperation(BYTE, CHAR, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(BYTE, DOUBLE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(BYTE, FLOAT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(BYTE, INT, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(BYTE, LONG, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(BYTE, SHORT, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(BYTE, BYTE, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), - binaryOperation(BYTE, CHAR, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(BYTE, DOUBLE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(BYTE, FLOAT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(BYTE, INT, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(BYTE, LONG, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(BYTE, SHORT, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(BYTE, BYTE, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), - binaryOperation(BYTE, CHAR, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(BYTE, DOUBLE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(BYTE, FLOAT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(BYTE, INT, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), binaryOperation(BYTE, LONG, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), binaryOperation(BYTE, SHORT, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), binaryOperation(BYTE, BYTE, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), - binaryOperation(BYTE, CHAR, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(BYTE, DOUBLE, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(BYTE, FLOAT, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(BYTE, INT, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), binaryOperation(BYTE, LONG, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), binaryOperation(BYTE, SHORT, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), binaryOperation(BYTE, ANY, "equals", { a, b -> a.equals(b) }, emptyBinaryFun), - binaryOperation(CHAR, BYTE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(CHAR, CHAR, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(CHAR, DOUBLE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(CHAR, FLOAT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(CHAR, INT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(CHAR, LONG, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(CHAR, SHORT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(CHAR, BYTE, "div", { a, b -> a.div(b) }, emptyBinaryFun), - binaryOperation(CHAR, DOUBLE, "div", { a, b -> a.div(b) }, emptyBinaryFun), - binaryOperation(CHAR, FLOAT, "div", { a, b -> a.div(b) }, emptyBinaryFun), - binaryOperation(CHAR, INT, "div", { a, b -> a.div(b) }, emptyBinaryFun), - binaryOperation(CHAR, LONG, "div", { a, b -> a.div(b) }, emptyBinaryFun), - binaryOperation(CHAR, SHORT, "div", { a, b -> a.div(b) }, emptyBinaryFun), - binaryOperation(CHAR, BYTE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(CHAR, CHAR, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), - binaryOperation(CHAR, DOUBLE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), - binaryOperation(CHAR, FLOAT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(CHAR, INT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), - binaryOperation(CHAR, LONG, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), - binaryOperation(CHAR, SHORT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), - binaryOperation(CHAR, BYTE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), - binaryOperation(CHAR, DOUBLE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), - binaryOperation(CHAR, FLOAT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), - binaryOperation(CHAR, INT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), - binaryOperation(CHAR, LONG, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), - binaryOperation(CHAR, SHORT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), - binaryOperation(CHAR, BYTE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), - binaryOperation(CHAR, DOUBLE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), - binaryOperation(CHAR, FLOAT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(CHAR, INT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), - binaryOperation(CHAR, LONG, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), - binaryOperation(CHAR, SHORT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), - binaryOperation(CHAR, BYTE, "times", { a, b -> a.times(b) }, emptyBinaryFun), - binaryOperation(CHAR, DOUBLE, "times", { a, b -> a.times(b) }, emptyBinaryFun), - binaryOperation(CHAR, FLOAT, "times", { a, b -> a.times(b) }, emptyBinaryFun), - binaryOperation(CHAR, INT, "times", { a, b -> a.times(b) }, emptyBinaryFun), - binaryOperation(CHAR, LONG, "times", { a, b -> a.times(b) }, emptyBinaryFun), - binaryOperation(CHAR, SHORT, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(CHAR, ANY, "equals", { a, b -> a.equals(b) }, emptyBinaryFun), binaryOperation(DOUBLE, BYTE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(DOUBLE, CHAR, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(DOUBLE, DOUBLE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(DOUBLE, FLOAT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(DOUBLE, INT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(DOUBLE, LONG, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(DOUBLE, SHORT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(DOUBLE, BYTE, "div", { a, b -> a.div(b) }, emptyBinaryFun), - binaryOperation(DOUBLE, CHAR, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(DOUBLE, DOUBLE, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(DOUBLE, FLOAT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(DOUBLE, INT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(DOUBLE, LONG, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(DOUBLE, SHORT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(DOUBLE, BYTE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), - binaryOperation(DOUBLE, CHAR, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, DOUBLE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, FLOAT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, INT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, LONG, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, SHORT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, BYTE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), - binaryOperation(DOUBLE, CHAR, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(DOUBLE, DOUBLE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(DOUBLE, FLOAT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(DOUBLE, INT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(DOUBLE, LONG, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(DOUBLE, SHORT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(DOUBLE, BYTE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), - binaryOperation(DOUBLE, CHAR, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, DOUBLE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, FLOAT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, INT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, LONG, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, SHORT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(DOUBLE, BYTE, "times", { a, b -> a.times(b) }, emptyBinaryFun), - binaryOperation(DOUBLE, CHAR, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(DOUBLE, DOUBLE, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(DOUBLE, FLOAT, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(DOUBLE, INT, "times", { a, b -> a.times(b) }, emptyBinaryFun), @@ -237,42 +189,36 @@ private val binaryOperations: HashMap, Pair a.times(b) }, emptyBinaryFun), binaryOperation(DOUBLE, ANY, "equals", { a, b -> a.equals(b) }, emptyBinaryFun), binaryOperation(FLOAT, BYTE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(FLOAT, CHAR, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(FLOAT, DOUBLE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(FLOAT, FLOAT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(FLOAT, INT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(FLOAT, LONG, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(FLOAT, SHORT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(FLOAT, BYTE, "div", { a, b -> a.div(b) }, emptyBinaryFun), - binaryOperation(FLOAT, CHAR, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(FLOAT, DOUBLE, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(FLOAT, FLOAT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(FLOAT, INT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(FLOAT, LONG, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(FLOAT, SHORT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(FLOAT, BYTE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), - binaryOperation(FLOAT, CHAR, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(FLOAT, DOUBLE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(FLOAT, FLOAT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(FLOAT, INT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(FLOAT, LONG, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(FLOAT, SHORT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(FLOAT, BYTE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), - binaryOperation(FLOAT, CHAR, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(FLOAT, DOUBLE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(FLOAT, FLOAT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(FLOAT, INT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(FLOAT, LONG, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(FLOAT, SHORT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(FLOAT, BYTE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), - binaryOperation(FLOAT, CHAR, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(FLOAT, DOUBLE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(FLOAT, FLOAT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(FLOAT, INT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(FLOAT, LONG, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(FLOAT, SHORT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(FLOAT, BYTE, "times", { a, b -> a.times(b) }, emptyBinaryFun), - binaryOperation(FLOAT, CHAR, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(FLOAT, DOUBLE, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(FLOAT, FLOAT, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(FLOAT, INT, "times", { a, b -> a.times(b) }, emptyBinaryFun), @@ -281,28 +227,24 @@ private val binaryOperations: HashMap, Pair a.equals(b) }, emptyBinaryFun), binaryOperation(INT, INT, "and", { a, b -> a.and(b) }, { a, b -> a.and(b) }), binaryOperation(INT, BYTE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(INT, CHAR, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(INT, DOUBLE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(INT, FLOAT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(INT, INT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(INT, LONG, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(INT, SHORT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(INT, BYTE, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), - binaryOperation(INT, CHAR, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(INT, DOUBLE, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(INT, FLOAT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(INT, INT, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(INT, LONG, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(INT, SHORT, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(INT, BYTE, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), - binaryOperation(INT, CHAR, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(INT, DOUBLE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(INT, FLOAT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(INT, INT, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(INT, LONG, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(INT, SHORT, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(INT, BYTE, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), - binaryOperation(INT, CHAR, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(INT, DOUBLE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(INT, FLOAT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(INT, INT, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), @@ -310,7 +252,6 @@ private val binaryOperations: HashMap, Pair a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(INT, INT, "or", { a, b -> a.or(b) }, { a, b -> a.or(b) }), binaryOperation(INT, BYTE, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), - binaryOperation(INT, CHAR, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(INT, DOUBLE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(INT, FLOAT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(INT, INT, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), @@ -319,7 +260,6 @@ private val binaryOperations: HashMap, Pair a.shl(b) }, emptyBinaryFun), binaryOperation(INT, INT, "shr", { a, b -> a.shr(b) }, emptyBinaryFun), binaryOperation(INT, BYTE, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), - binaryOperation(INT, CHAR, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(INT, DOUBLE, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(INT, FLOAT, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(INT, INT, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), @@ -330,28 +270,24 @@ private val binaryOperations: HashMap, Pair a.equals(b) }, emptyBinaryFun), binaryOperation(LONG, LONG, "and", { a, b -> a.and(b) }, { a, b -> a.and(b) }), binaryOperation(LONG, BYTE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(LONG, CHAR, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(LONG, DOUBLE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(LONG, FLOAT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(LONG, INT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(LONG, LONG, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(LONG, SHORT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(LONG, BYTE, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), - binaryOperation(LONG, CHAR, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(LONG, DOUBLE, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(LONG, FLOAT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(LONG, INT, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(LONG, LONG, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(LONG, SHORT, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(LONG, BYTE, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), - binaryOperation(LONG, CHAR, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(LONG, DOUBLE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(LONG, FLOAT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(LONG, INT, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(LONG, LONG, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(LONG, SHORT, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(LONG, BYTE, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), - binaryOperation(LONG, CHAR, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(LONG, DOUBLE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(LONG, FLOAT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(LONG, INT, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), @@ -359,7 +295,6 @@ private val binaryOperations: HashMap, Pair a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(LONG, LONG, "or", { a, b -> a.or(b) }, { a, b -> a.or(b) }), binaryOperation(LONG, BYTE, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), - binaryOperation(LONG, CHAR, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(LONG, DOUBLE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(LONG, FLOAT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(LONG, INT, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), @@ -368,7 +303,6 @@ private val binaryOperations: HashMap, Pair a.shl(b) }, emptyBinaryFun), binaryOperation(LONG, INT, "shr", { a, b -> a.shr(b) }, emptyBinaryFun), binaryOperation(LONG, BYTE, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), - binaryOperation(LONG, CHAR, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(LONG, DOUBLE, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(LONG, FLOAT, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(LONG, INT, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), @@ -378,42 +312,36 @@ private val binaryOperations: HashMap, Pair a.xor(b) }, { a, b -> a.xor(b) }), binaryOperation(LONG, ANY, "equals", { a, b -> a.equals(b) }, emptyBinaryFun), binaryOperation(SHORT, BYTE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), - binaryOperation(SHORT, CHAR, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(SHORT, DOUBLE, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(SHORT, FLOAT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(SHORT, INT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(SHORT, LONG, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(SHORT, SHORT, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun), binaryOperation(SHORT, BYTE, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), - binaryOperation(SHORT, CHAR, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(SHORT, DOUBLE, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(SHORT, FLOAT, "div", { a, b -> a.div(b) }, emptyBinaryFun), binaryOperation(SHORT, INT, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(SHORT, LONG, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(SHORT, SHORT, "div", { a, b -> a.div(b) }, { a, b -> a.divide(b) }), binaryOperation(SHORT, BYTE, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), - binaryOperation(SHORT, CHAR, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(SHORT, DOUBLE, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(SHORT, FLOAT, "minus", { a, b -> a.minus(b) }, emptyBinaryFun), binaryOperation(SHORT, INT, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(SHORT, LONG, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(SHORT, SHORT, "minus", { a, b -> a.minus(b) }, { a, b -> a.subtract(b) }), binaryOperation(SHORT, BYTE, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), - binaryOperation(SHORT, CHAR, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(SHORT, DOUBLE, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(SHORT, FLOAT, "mod", { a, b -> a.mod(b) }, emptyBinaryFun), binaryOperation(SHORT, INT, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(SHORT, LONG, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(SHORT, SHORT, "mod", { a, b -> a.mod(b) }, { a, b -> a.mod(b) }), binaryOperation(SHORT, BYTE, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), - binaryOperation(SHORT, CHAR, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(SHORT, DOUBLE, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(SHORT, FLOAT, "plus", { a, b -> a.plus(b) }, emptyBinaryFun), binaryOperation(SHORT, INT, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), binaryOperation(SHORT, LONG, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), binaryOperation(SHORT, SHORT, "plus", { a, b -> a.plus(b) }, { a, b -> a.add(b) }), binaryOperation(SHORT, BYTE, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), - binaryOperation(SHORT, CHAR, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(SHORT, DOUBLE, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(SHORT, FLOAT, "times", { a, b -> a.times(b) }, emptyBinaryFun), binaryOperation(SHORT, INT, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }), diff --git a/core/builtins/native/kotlin/Char.kt b/core/builtins/native/kotlin/Char.kt index e9d618dffed..ed2d8454d53 100644 --- a/core/builtins/native/kotlin/Char.kt +++ b/core/builtins/native/kotlin/Char.kt @@ -23,162 +23,27 @@ package kotlin public class Char private () : Comparable { companion object {} - /** - * Compares the character code of this character with the specified value for order. - * Returns zero if this value is equal to the specified other value, a negative number if its less than other, - * or a positive number if its greater than other. - */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int or other operand to Char.") - public fun compareTo(other: Byte): Int /** * Compares this value with the specified value for order. * Returns zero if this value is equal to the specified other value, a negative number if its less than other, * or a positive number if its greater than other. */ public override fun compareTo(other: Char): Int - /** - * Compares the character code of this character with the specified value for order. - * Returns zero if this value is equal to the specified other value, a negative number if its less than other, - * or a positive number if its greater than other. - */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int or other operand to Char.") - public fun compareTo(other: Short): Int - /** - * Compares the character code of this character with the specified value for order. - * Returns zero if this value is equal to the specified other value, a negative number if its less than other, - * or a positive number if its greater than other. - */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int or other operand to Char.") - public fun compareTo(other: Int): Int - /** - * Compares the character code of this character with the specified value for order. - * Returns zero if this value is equal to the specified other value, a negative number if its less than other, - * or a positive number if its greater than other. - */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int or other operand to Char.") - public fun compareTo(other: Long): Int - /** - * Compares the character code of this character with the specified value for order. - * Returns zero if this value is equal to the specified other value, a negative number if its less than other, - * or a positive number if its greater than other. - */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun compareTo(other: Float): Int - /** - * Compares the character code of this character with the specified value for order. - * Returns zero if this value is equal to the specified other value, a negative number if its less than other, - * or a positive number if its greater than other. - */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun compareTo(other: Double): Int - /** Adds the other value to this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun plus(other: Byte): Int - /** Adds the other value to this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun plus(other: Short): Int /** Adds the other value to this value. */ deprecated("This operation will change return type to Char in M13. Either call toInt or toChar on return value or convert Char operand to Int.") public fun plus(other: Int): Int - /** Adds the other value to this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun plus(other: Long): Long - /** Adds the other value to this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun plus(other: Float): Float - /** Adds the other value to this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun plus(other: Double): Double - /** Subtracts the other value from this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun minus(other: Byte): Int /** Subtracts the other value from this value. */ public fun minus(other: Char): Int /** Subtracts the other value from this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun minus(other: Short): Int - /** Subtracts the other value from this value. */ deprecated("This operation will change return type to Char in M13. Either call toInt or toChar on return value or convert Char operand to Int.") public fun minus(other: Int): Int - /** Subtracts the other value from this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun minus(other: Long): Long - /** Subtracts the other value from this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun minus(other: Float): Float - /** Subtracts the other value from this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun minus(other: Double): Double - - /** Multiplies this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun times(other: Byte): Int - /** Multiplies this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun times(other: Short): Int - /** Multiplies this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun times(other: Int): Int - /** Multiplies this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun times(other: Long): Long - /** Multiplies this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun times(other: Float): Float - /** Multiplies this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun times(other: Double): Double - - /** Divides this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun div(other: Byte): Int - /** Divides this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun div(other: Short): Int - /** Divides this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun div(other: Int): Int - /** Divides this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun div(other: Long): Long - /** Divides this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun div(other: Float): Float - /** Divides this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun div(other: Double): Double - - /** Calculates the remainder of dividing this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun mod(other: Byte): Int - /** Calculates the remainder of dividing this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun mod(other: Short): Int - /** Calculates the remainder of dividing this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun mod(other: Int): Int - /** Calculates the remainder of dividing this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun mod(other: Long): Long - /** Calculates the remainder of dividing this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun mod(other: Float): Float - /** Calculates the remainder of dividing this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun mod(other: Double): Double /** Increments this value. */ public fun inc(): Char /** Decrements this value. */ public fun dec(): Char - /** Returns this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun plus(): Int - /** Returns the negative of this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun minus(): Int /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Char): CharRange diff --git a/core/builtins/native/kotlin/Primitives.kt b/core/builtins/native/kotlin/Primitives.kt index 1f4bbc8b09d..c0f93d7577f 100644 --- a/core/builtins/native/kotlin/Primitives.kt +++ b/core/builtins/native/kotlin/Primitives.kt @@ -31,13 +31,6 @@ public class Byte private () : Number, Comparable { * or a positive number if its greater than other. */ public override fun compareTo(other: Byte): Int -/** - * Compares this value with the character code of the specified character for order. - * Returns zero if this value is equal to the specified other value, a negative number if its less than other, - * or a positive number if its greater than other. - */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun compareTo(other: Char): Int /** * Compares this value with the specified value for order. * Returns zero if this value is equal to the specified other value, a negative number if its less than other, @@ -72,9 +65,6 @@ public class Byte private () : Number, Comparable { /** Adds the other value to this value. */ public fun plus(other: Byte): Int /** Adds the other value to this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun plus(other: Char): Int - /** Adds the other value to this value. */ public fun plus(other: Short): Int /** Adds the other value to this value. */ public fun plus(other: Int): Int @@ -88,9 +78,6 @@ public class Byte private () : Number, Comparable { /** Subtracts the other value from this value. */ public fun minus(other: Byte): Int /** Subtracts the other value from this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun minus(other: Char): Int - /** Subtracts the other value from this value. */ public fun minus(other: Short): Int /** Subtracts the other value from this value. */ public fun minus(other: Int): Int @@ -104,9 +91,6 @@ public class Byte private () : Number, Comparable { /** Multiplies this value by the other value. */ public fun times(other: Byte): Int /** Multiplies this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun times(other: Char): Int - /** Multiplies this value by the other value. */ public fun times(other: Short): Int /** Multiplies this value by the other value. */ public fun times(other: Int): Int @@ -120,9 +104,6 @@ public class Byte private () : Number, Comparable { /** Divides this value by the other value. */ public fun div(other: Byte): Int /** Divides this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun div(other: Char): Int - /** Divides this value by the other value. */ public fun div(other: Short): Int /** Divides this value by the other value. */ public fun div(other: Int): Int @@ -136,9 +117,6 @@ public class Byte private () : Number, Comparable { /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Byte): Int /** Calculates the remainder of dividing this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun mod(other: Char): Int - /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Short): Int /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Int): Int @@ -161,9 +139,6 @@ public class Byte private () : Number, Comparable { /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Byte): ByteRange /** Creates a range from this value to the specified [other] value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun rangeTo(other: Char): CharRange - /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Short): ShortRange /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Int): IntRange @@ -196,13 +171,6 @@ public class Short private () : Number, Comparable { * or a positive number if its greater than other. */ public fun compareTo(other: Byte): Int -/** - * Compares this value with the character code of the specified character for order. - * Returns zero if this value is equal to the specified other value, a negative number if its less than other, - * or a positive number if its greater than other. - */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun compareTo(other: Char): Int /** * Compares this value with the specified value for order. * Returns zero if this value is equal to the specified other value, a negative number if its less than other, @@ -237,9 +205,6 @@ public class Short private () : Number, Comparable { /** Adds the other value to this value. */ public fun plus(other: Byte): Int /** Adds the other value to this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun plus(other: Char): Int - /** Adds the other value to this value. */ public fun plus(other: Short): Int /** Adds the other value to this value. */ public fun plus(other: Int): Int @@ -253,9 +218,6 @@ public class Short private () : Number, Comparable { /** Subtracts the other value from this value. */ public fun minus(other: Byte): Int /** Subtracts the other value from this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun minus(other: Char): Int - /** Subtracts the other value from this value. */ public fun minus(other: Short): Int /** Subtracts the other value from this value. */ public fun minus(other: Int): Int @@ -269,9 +231,6 @@ public class Short private () : Number, Comparable { /** Multiplies this value by the other value. */ public fun times(other: Byte): Int /** Multiplies this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun times(other: Char): Int - /** Multiplies this value by the other value. */ public fun times(other: Short): Int /** Multiplies this value by the other value. */ public fun times(other: Int): Int @@ -285,9 +244,6 @@ public class Short private () : Number, Comparable { /** Divides this value by the other value. */ public fun div(other: Byte): Int /** Divides this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun div(other: Char): Int - /** Divides this value by the other value. */ public fun div(other: Short): Int /** Divides this value by the other value. */ public fun div(other: Int): Int @@ -301,9 +257,6 @@ public class Short private () : Number, Comparable { /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Byte): Int /** Calculates the remainder of dividing this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun mod(other: Char): Int - /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Short): Int /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Int): Int @@ -326,9 +279,6 @@ public class Short private () : Number, Comparable { /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Byte): ShortRange /** Creates a range from this value to the specified [other] value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun rangeTo(other: Char): ShortRange - /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Short): ShortRange /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Int): IntRange @@ -361,13 +311,6 @@ public class Int private () : Number, Comparable { * or a positive number if its greater than other. */ public fun compareTo(other: Byte): Int -/** - * Compares this value with the character code of the specified character for order. - * Returns zero if this value is equal to the specified other value, a negative number if its less than other, - * or a positive number if its greater than other. - */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun compareTo(other: Char): Int /** * Compares this value with the specified value for order. * Returns zero if this value is equal to the specified other value, a negative number if its less than other, @@ -402,9 +345,6 @@ public class Int private () : Number, Comparable { /** Adds the other value to this value. */ public fun plus(other: Byte): Int /** Adds the other value to this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun plus(other: Char): Int - /** Adds the other value to this value. */ public fun plus(other: Short): Int /** Adds the other value to this value. */ public fun plus(other: Int): Int @@ -418,9 +358,6 @@ public class Int private () : Number, Comparable { /** Subtracts the other value from this value. */ public fun minus(other: Byte): Int /** Subtracts the other value from this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun minus(other: Char): Int - /** Subtracts the other value from this value. */ public fun minus(other: Short): Int /** Subtracts the other value from this value. */ public fun minus(other: Int): Int @@ -434,9 +371,6 @@ public class Int private () : Number, Comparable { /** Multiplies this value by the other value. */ public fun times(other: Byte): Int /** Multiplies this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun times(other: Char): Int - /** Multiplies this value by the other value. */ public fun times(other: Short): Int /** Multiplies this value by the other value. */ public fun times(other: Int): Int @@ -450,9 +384,6 @@ public class Int private () : Number, Comparable { /** Divides this value by the other value. */ public fun div(other: Byte): Int /** Divides this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun div(other: Char): Int - /** Divides this value by the other value. */ public fun div(other: Short): Int /** Divides this value by the other value. */ public fun div(other: Int): Int @@ -466,9 +397,6 @@ public class Int private () : Number, Comparable { /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Byte): Int /** Calculates the remainder of dividing this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun mod(other: Char): Int - /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Short): Int /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Int): Int @@ -491,9 +419,6 @@ public class Int private () : Number, Comparable { /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Byte): IntRange /** Creates a range from this value to the specified [other] value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun rangeTo(other: Char): IntRange - /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Short): IntRange /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Int): IntRange @@ -541,13 +466,6 @@ public class Long private () : Number, Comparable { * or a positive number if its greater than other. */ public fun compareTo(other: Byte): Int -/** - * Compares this value with the character code of the specified character for order. - * Returns zero if this value is equal to the specified other value, a negative number if its less than other, - * or a positive number if its greater than other. - */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun compareTo(other: Char): Int /** * Compares this value with the specified value for order. * Returns zero if this value is equal to the specified other value, a negative number if its less than other, @@ -582,9 +500,6 @@ public class Long private () : Number, Comparable { /** Adds the other value to this value. */ public fun plus(other: Byte): Long /** Adds the other value to this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun plus(other: Char): Long - /** Adds the other value to this value. */ public fun plus(other: Short): Long /** Adds the other value to this value. */ public fun plus(other: Int): Long @@ -598,9 +513,6 @@ public class Long private () : Number, Comparable { /** Subtracts the other value from this value. */ public fun minus(other: Byte): Long /** Subtracts the other value from this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun minus(other: Char): Long - /** Subtracts the other value from this value. */ public fun minus(other: Short): Long /** Subtracts the other value from this value. */ public fun minus(other: Int): Long @@ -614,9 +526,6 @@ public class Long private () : Number, Comparable { /** Multiplies this value by the other value. */ public fun times(other: Byte): Long /** Multiplies this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun times(other: Char): Long - /** Multiplies this value by the other value. */ public fun times(other: Short): Long /** Multiplies this value by the other value. */ public fun times(other: Int): Long @@ -630,9 +539,6 @@ public class Long private () : Number, Comparable { /** Divides this value by the other value. */ public fun div(other: Byte): Long /** Divides this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun div(other: Char): Long - /** Divides this value by the other value. */ public fun div(other: Short): Long /** Divides this value by the other value. */ public fun div(other: Int): Long @@ -646,9 +552,6 @@ public class Long private () : Number, Comparable { /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Byte): Long /** Calculates the remainder of dividing this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun mod(other: Char): Long - /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Short): Long /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Int): Long @@ -671,9 +574,6 @@ public class Long private () : Number, Comparable { /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Byte): LongRange /** Creates a range from this value to the specified [other] value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun rangeTo(other: Char): LongRange - /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Short): LongRange /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Int): LongRange @@ -721,13 +621,6 @@ public class Float private () : Number, Comparable { * or a positive number if its greater than other. */ public fun compareTo(other: Byte): Int -/** - * Compares this value with the character code of the specified character for order. - * Returns zero if this value is equal to the specified other value, a negative number if its less than other, - * or a positive number if its greater than other. - */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun compareTo(other: Char): Int /** * Compares this value with the specified value for order. * Returns zero if this value is equal to the specified other value, a negative number if its less than other, @@ -762,9 +655,6 @@ public class Float private () : Number, Comparable { /** Adds the other value to this value. */ public fun plus(other: Byte): Float /** Adds the other value to this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun plus(other: Char): Float - /** Adds the other value to this value. */ public fun plus(other: Short): Float /** Adds the other value to this value. */ public fun plus(other: Int): Float @@ -778,9 +668,6 @@ public class Float private () : Number, Comparable { /** Subtracts the other value from this value. */ public fun minus(other: Byte): Float /** Subtracts the other value from this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun minus(other: Char): Float - /** Subtracts the other value from this value. */ public fun minus(other: Short): Float /** Subtracts the other value from this value. */ public fun minus(other: Int): Float @@ -794,9 +681,6 @@ public class Float private () : Number, Comparable { /** Multiplies this value by the other value. */ public fun times(other: Byte): Float /** Multiplies this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun times(other: Char): Float - /** Multiplies this value by the other value. */ public fun times(other: Short): Float /** Multiplies this value by the other value. */ public fun times(other: Int): Float @@ -810,9 +694,6 @@ public class Float private () : Number, Comparable { /** Divides this value by the other value. */ public fun div(other: Byte): Float /** Divides this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun div(other: Char): Float - /** Divides this value by the other value. */ public fun div(other: Short): Float /** Divides this value by the other value. */ public fun div(other: Int): Float @@ -826,9 +707,6 @@ public class Float private () : Number, Comparable { /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Byte): Float /** Calculates the remainder of dividing this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun mod(other: Char): Float - /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Short): Float /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Int): Float @@ -851,9 +729,6 @@ public class Float private () : Number, Comparable { /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Byte): FloatRange /** Creates a range from this value to the specified [other] value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun rangeTo(other: Char): FloatRange - /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Short): FloatRange /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Int): FloatRange @@ -886,13 +761,6 @@ public class Double private () : Number, Comparable { * or a positive number if its greater than other. */ public fun compareTo(other: Byte): Int -/** - * Compares this value with the character code of the specified character for order. - * Returns zero if this value is equal to the specified other value, a negative number if its less than other, - * or a positive number if its greater than other. - */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun compareTo(other: Char): Int /** * Compares this value with the specified value for order. * Returns zero if this value is equal to the specified other value, a negative number if its less than other, @@ -927,9 +795,6 @@ public class Double private () : Number, Comparable { /** Adds the other value to this value. */ public fun plus(other: Byte): Double /** Adds the other value to this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun plus(other: Char): Double - /** Adds the other value to this value. */ public fun plus(other: Short): Double /** Adds the other value to this value. */ public fun plus(other: Int): Double @@ -943,9 +808,6 @@ public class Double private () : Number, Comparable { /** Subtracts the other value from this value. */ public fun minus(other: Byte): Double /** Subtracts the other value from this value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun minus(other: Char): Double - /** Subtracts the other value from this value. */ public fun minus(other: Short): Double /** Subtracts the other value from this value. */ public fun minus(other: Int): Double @@ -959,9 +821,6 @@ public class Double private () : Number, Comparable { /** Multiplies this value by the other value. */ public fun times(other: Byte): Double /** Multiplies this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun times(other: Char): Double - /** Multiplies this value by the other value. */ public fun times(other: Short): Double /** Multiplies this value by the other value. */ public fun times(other: Int): Double @@ -975,9 +834,6 @@ public class Double private () : Number, Comparable { /** Divides this value by the other value. */ public fun div(other: Byte): Double /** Divides this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun div(other: Char): Double - /** Divides this value by the other value. */ public fun div(other: Short): Double /** Divides this value by the other value. */ public fun div(other: Int): Double @@ -991,9 +847,6 @@ public class Double private () : Number, Comparable { /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Byte): Double /** Calculates the remainder of dividing this value by the other value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun mod(other: Char): Double - /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Short): Double /** Calculates the remainder of dividing this value by the other value. */ public fun mod(other: Int): Double @@ -1016,9 +869,6 @@ public class Double private () : Number, Comparable { /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Byte): DoubleRange /** Creates a range from this value to the specified [other] value. */ - deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.") - public fun rangeTo(other: Char): DoubleRange - /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Short): DoubleRange /** Creates a range from this value to the specified [other] value. */ public fun rangeTo(other: Int): DoubleRange diff --git a/generators/src/org/jetbrains/kotlin/generators/builtins/common.kt b/generators/src/org/jetbrains/kotlin/generators/builtins/common.kt index 736282866aa..75d6acd97ba 100644 --- a/generators/src/org/jetbrains/kotlin/generators/builtins/common.kt +++ b/generators/src/org/jetbrains/kotlin/generators/builtins/common.kt @@ -31,8 +31,8 @@ enum class PrimitiveType { val capitalized: String get() = name().toLowerCase().capitalize() companion object { - val exceptBoolean: List by Delegates.lazy { PrimitiveType.values().filterNot { it == BOOLEAN } } - val onlyNumeric: List by Delegates.lazy { PrimitiveType.values().filterNot { it == BOOLEAN || it == CHAR }} + val exceptBoolean: List by lazy { PrimitiveType.values().filterNot { it == BOOLEAN } } + val onlyNumeric: List by lazy { PrimitiveType.values().filterNot { it == BOOLEAN || it == CHAR }} } } diff --git a/generators/src/org/jetbrains/kotlin/generators/builtins/primitives.kt b/generators/src/org/jetbrains/kotlin/generators/builtins/primitives.kt index a54d632126c..0b2b85af5ef 100644 --- a/generators/src/org/jetbrains/kotlin/generators/builtins/primitives.kt +++ b/generators/src/org/jetbrains/kotlin/generators/builtins/primitives.kt @@ -90,18 +90,12 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) { } private fun generateCompareTo(thisKind: PrimitiveType) { - for (otherKind in PrimitiveType.exceptBoolean) { + for (otherKind in PrimitiveType.onlyNumeric) { out.println("/**") - if (otherKind == PrimitiveType.CHAR) { - out.println(" * Compares this value with the character code of the specified character for order.") - } else { - out.println(" * Compares this value with the specified value for order.") - } + out.println(" * Compares this value with the specified value for order.") out.println(" * Returns zero if this value is equal to the specified other value, a negative number if its less than other, ") out.println(" * or a positive number if its greater than other.") out.println(" */") - if (otherKind == PrimitiveType.CHAR) - out.println(""" deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.")""") out.print(" public ") if (otherKind == thisKind) out.print("override ") out.println("fun compareTo(other: ${otherKind.capitalized}): Int") @@ -116,22 +110,18 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) { } private fun generateOperator(name: String, doc: String, thisKind: PrimitiveType) { - for (otherKind in PrimitiveType.exceptBoolean) { + for (otherKind in PrimitiveType.onlyNumeric) { val returnType = getOperatorReturnType(thisKind, otherKind) out.println(" /** $doc */") - if (otherKind == PrimitiveType.CHAR) - out.println(""" deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.")""") out.println(" public fun $name(other: ${otherKind.capitalized}): $returnType") } out.println() } private fun generateRangeTo(thisKind: PrimitiveType) { - for (otherKind in PrimitiveType.exceptBoolean) { + for (otherKind in PrimitiveType.onlyNumeric) { val returnType = if (otherKind.ordinal() > thisKind.ordinal()) otherKind else thisKind out.println(" /** Creates a range from this value to the specified [other] value. */") - if (otherKind == PrimitiveType.CHAR) - out.println(""" deprecated("This operation doesn't make sense and shall be removed in M13. Consider converting Char operand to Int.")""") out.println(" public fun rangeTo(other: ${otherKind.capitalized}): ${returnType.capitalized}Range") } out.println()