Fix rangeTo between Float and Long
Float.rangeTo(Long) and Long.rangeTo(Float) now both return FloatRange for consistency with other binary operations between floats and longs which, in turn, return float to be consistent with Java
This commit is contained in:
@@ -585,7 +585,7 @@ public final class Float : jet.Number, jet.Comparable<jet.Float> {
|
||||
public final fun rangeTo(/*0*/ other: jet.Double): jet.DoubleRange
|
||||
public final fun rangeTo(/*0*/ other: jet.Float): jet.FloatRange
|
||||
public final fun rangeTo(/*0*/ other: jet.Int): jet.FloatRange
|
||||
public final fun rangeTo(/*0*/ other: jet.Long): jet.DoubleRange
|
||||
public final fun rangeTo(/*0*/ other: jet.Long): jet.FloatRange
|
||||
public final fun rangeTo(/*0*/ other: jet.Short): jet.FloatRange
|
||||
public final fun times(/*0*/ other: jet.Byte): jet.Float
|
||||
public final fun times(/*0*/ other: jet.Char): jet.Float
|
||||
|
||||
@@ -141,7 +141,7 @@ public class Float private () : Number, Comparable<Float> {
|
||||
|
||||
public fun rangeTo(other : Double) : DoubleRange
|
||||
public fun rangeTo(other : Float) : FloatRange
|
||||
public fun rangeTo(other : Long) : DoubleRange
|
||||
public fun rangeTo(other : Long) : FloatRange
|
||||
public fun rangeTo(other : Int) : FloatRange
|
||||
public fun rangeTo(other : Short) : FloatRange
|
||||
public fun rangeTo(other : Byte) : FloatRange
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2013 JetBrains s.r.o.
|
||||
* Copyright 2010-2014 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.
|
||||
@@ -14,12 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
package jet.runtime;
|
||||
|
||||
import jet.*;
|
||||
|
||||
/* This file is generated by org.jetbrains.jet.generators.runtime.GenerateRanges. DO NOT EDIT! */
|
||||
/* This file is generated by org.jetbrains.jet.generators.builtins.GenerateRangeIntrinsics. DO NOT EDIT! */
|
||||
public class Ranges {
|
||||
public static ByteRange rangeTo(byte from, byte to) {
|
||||
return new ByteRange(from, to);
|
||||
|
||||
@@ -38,7 +38,6 @@ public class GenerateRangeIntrinsics {
|
||||
try {
|
||||
String copyright = "injector-generator/copyright.txt";
|
||||
out.println(FileUtil.loadFile(new File(copyright)));
|
||||
out.println();
|
||||
|
||||
out.println("package jet.runtime;");
|
||||
out.println();
|
||||
|
||||
Reference in New Issue
Block a user