Skip to content

Commit bd0ba9b

Browse files
committed
Fix result type of scala.math.Ordering.tryCompare
1 parent 40b156b commit bd0ba9b

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

project/MiMaFilters.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ object MiMaFilters {
217217
"scala.io.Source#RelaxedPosition.this",
218218
"scala.jdk.Accumulator#AccumulatorFactoryShape.anyAccumulatorFactoryShape", "scala.jdk.Accumulator#AccumulatorFactoryShape.doubleAccumulatorFactoryShape", "scala.jdk.Accumulator#AccumulatorFactoryShape.intAccumulatorFactoryShape", "scala.jdk.Accumulator#AccumulatorFactoryShape.jDoubleAccumulatorFactoryShape", "scala.jdk.Accumulator#AccumulatorFactoryShape.jIntegerAccumulatorFactoryShape", "scala.jdk.Accumulator#AccumulatorFactoryShape.jLongAccumulatorFactoryShape", "scala.jdk.Accumulator#AccumulatorFactoryShape.longAccumulatorFactoryShape",
219219
"scala.jdk.FunctionWrappers#*",
220-
"scala.math.Ordering.tryCompare",
221220
"scala.PartialFunction.unlifted",
222221
"scala.sys.process.BasicIO.connectNoOp", "scala.sys.process.BasicIO.connectToStdIn",
223222
"scala.sys.process.Process.Future",

project/TastyMiMaFilters.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ object TastyMiMaFilters {
114114
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.convert.JavaCollectionWrappers.*.mapFactory"),
115115
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.collection.mutable.LinkedHash*.newBuilder"),
116116
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.math.Big*.underlying"),
117-
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.math.Ordering.tryCompare"),
118117
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.immutable.TreeSet.sortedIterableFactory"),
119118
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.immutable.BitSet.bitSetFactory"),
120119
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.mutable.BitSet.bitSetFactory"),

stdlib-bootstrapped/src/scala/math/Ordering.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ trait Ordering[T] extends Comparator[T] with PartialOrdering[T] with Serializabl
7676
/** Returns whether a comparison between `x` and `y` is defined, and if so
7777
* the result of `compare(x, y)`.
7878
*/
79-
def tryCompare(x: T, y: T) = Some(compare(x, y))
79+
def tryCompare(x: T, y: T): Some[Int] = Some(compare(x, y))
8080

8181
/** Returns an integer whose sign communicates how x compares to y.
8282
*

0 commit comments

Comments
 (0)