From a3b33a184027816207d6ba1250b3d0ab5f433e5e Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 22 Feb 2012 09:56:47 +0100 Subject: Made more traits universal. --- src/library/scala/collection/IndexedSeqLike.scala | 2 +- src/library/scala/collection/IndexedSeqOptimized.scala | 2 +- src/library/scala/collection/immutable/StringLike.scala | 2 +- src/library/scala/runtime/ScalaNumberProxy.scala | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/library/scala/collection/IndexedSeqLike.scala b/src/library/scala/collection/IndexedSeqLike.scala index baf5606ab5..d1f7d1cb36 100644 --- a/src/library/scala/collection/IndexedSeqLike.scala +++ b/src/library/scala/collection/IndexedSeqLike.scala @@ -37,7 +37,7 @@ import scala.annotation.tailrec * @define willNotTerminateInf * @define mayNotTerminateInf */ -trait IndexedSeqLike[+A, +Repr] extends SeqLike[A, Repr] { +trait IndexedSeqLike[+A, +Repr] extends Any with SeqLike[A, Repr] { self => def seq: IndexedSeq[A] diff --git a/src/library/scala/collection/IndexedSeqOptimized.scala b/src/library/scala/collection/IndexedSeqOptimized.scala index 196e77c91b..9d03a11db9 100755 --- a/src/library/scala/collection/IndexedSeqOptimized.scala +++ b/src/library/scala/collection/IndexedSeqOptimized.scala @@ -22,7 +22,7 @@ import scala.annotation.tailrec * @define willNotTerminateInf * @define mayNotTerminateInf */ -trait IndexedSeqOptimized[+A, +Repr] extends IndexedSeqLike[A, Repr] { self => +trait IndexedSeqOptimized[+A, +Repr] extends Any with IndexedSeqLike[A, Repr] { self => override /*IterableLike*/ def isEmpty: Boolean = { length == 0 } diff --git a/src/library/scala/collection/immutable/StringLike.scala b/src/library/scala/collection/immutable/StringLike.scala index 9b52c8805c..f9697565de 100644 --- a/src/library/scala/collection/immutable/StringLike.scala +++ b/src/library/scala/collection/immutable/StringLike.scala @@ -40,7 +40,7 @@ import StringLike._ * @define mayNotTerminateInf * @define willNotTerminateInf */ -trait StringLike[+Repr] extends collection.IndexedSeqOptimized[Char, Repr] with Ordered[String] { +trait StringLike[+Repr] extends Any with collection.IndexedSeqOptimized[Char, Repr] with Ordered[String] { self => /** Creates a string builder buffer as builder for this class */ diff --git a/src/library/scala/runtime/ScalaNumberProxy.scala b/src/library/scala/runtime/ScalaNumberProxy.scala index bd19e099e0..d9b9a7843f 100644 --- a/src/library/scala/runtime/ScalaNumberProxy.scala +++ b/src/library/scala/runtime/ScalaNumberProxy.scala @@ -64,12 +64,12 @@ abstract class FractionalProxy[T : Fractional] extends ScalaNumberProxy[T] with def to(end: T, step: T): NumericRange.Inclusive[T] = NumericRange.inclusive(self, end, step) } -trait OrderedProxy[T] extends Ordered[T] with Typed[T] { +trait OrderedProxy[T] extends Any with Ordered[T] with Typed[T] { protected def ord: Ordering[T] def compare(y: T) = ord.compare(self, y) } -trait RangedProxy[T] extends Typed[T] { +trait RangedProxy[T] extends Any with Typed[T] { type ResultWithoutStep def until(end: T): ResultWithoutStep -- cgit v1.2.3