From fe2068ef0d167a07ac4b1cf468f17ca5b741b29c Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 10 Sep 2009 16:40:34 +0000 Subject: Missing files from last checkin --- src/library/scala/collection/generic/LinkedListTemplate.scala | 5 ++--- src/library/scala/collection/script/Message.scala | 3 --- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/library/scala/collection/generic/LinkedListTemplate.scala b/src/library/scala/collection/generic/LinkedListTemplate.scala index ff96da826e..b15e5c50d0 100644 --- a/src/library/scala/collection/generic/LinkedListTemplate.scala +++ b/src/library/scala/collection/generic/LinkedListTemplate.scala @@ -17,7 +17,6 @@ import annotation.tailrec * list. Type variable A refers to the element type of the * list, type variable This is used to model self types of * linked lists. - * !!! todo: integrate with LinearSequence, need to drop null then. * @author Matthias Zenger * @author Martin Odersky * @version 2.8 @@ -40,7 +39,7 @@ trait LinkedListTemplate[A, This >: Null <: Sequence[A] with LinkedListTemplate[ if (x.next eq null) x.next = that else loop(x.next) } - loop(thisCollection) + loop(repr) } def insert(that: This): Unit = if (that ne null) { @@ -50,7 +49,7 @@ trait LinkedListTemplate[A, This >: Null <: Sequence[A] with LinkedListTemplate[ override def drop(n: Int): This = { var i = 0 - var these: This = thisCollection + var these: This = repr while (i < n && (these ne null)) { these = these.next.asInstanceOf[This] // !!! concrete overrides abstract problem i += 1 diff --git a/src/library/scala/collection/script/Message.scala b/src/library/scala/collection/script/Message.scala index b333c83fb7..6c370a7e66 100644 --- a/src/library/scala/collection/script/Message.scala +++ b/src/library/scala/collection/script/Message.scala @@ -83,7 +83,4 @@ class Script[A] extends ArrayBuffer[Message[A]] with Message[A] { } res + ")" } - - override def hashCode(): Int = - throw new UnsupportedOperationException("scripts are not suitable as hash keys") } -- cgit v1.2.3