Minor cleanup: remove unused condition

This commit is contained in:
Ilya Gorbunov
2022-08-02 16:31:38 +02:00
committed by Space
parent 66117367ad
commit ec9c862034
+1 -3
View File
@@ -240,9 +240,7 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) {
private fun generateRangeTo(thisKind: PrimitiveType) {
for (otherKind in PrimitiveType.onlyNumeric) {
val returnType =
maxByDomainCapacity(thisKind, otherKind)
.let { if (it == PrimitiveType.CHAR) it else maxByDomainCapacity(it, PrimitiveType.INT) }
val returnType = maxByDomainCapacity(maxByDomainCapacity(thisKind, otherKind), PrimitiveType.INT)
if (returnType == PrimitiveType.DOUBLE || returnType == PrimitiveType.FLOAT)
continue
out.println(" /** Creates a range from this value to the specified [other] value. */")