From 9e67e8eb2a4480d2761d2e08a87cea6b32a71fbb Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 22 Mar 2005 15:26:54 +0000 Subject: *** empty log message *** --- test/files/pos/List1.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/files/pos/List1.scala') diff --git a/test/files/pos/List1.scala b/test/files/pos/List1.scala index f0fce9501f..1321d95c20 100644 --- a/test/files/pos/List1.scala +++ b/test/files/pos/List1.scala @@ -1,19 +1,19 @@ object lists { - trait List[a] { + abstract class List[a] { def isEmpty: Boolean; def head: a; def tail: List[a]; def prepend(x: a) = Cons[a](x, this); } - def Nil[a] = new List[a] { + def Nil[b] = new List[b] { def isEmpty: Boolean = true; def head = error("head of Nil"); def tail = error("tail of Nil"); } - def Cons[a](x: a, xs: List[a]): List[a] = new List[a] { + def Cons[c](x: c, xs: List[c]): List[c] = new List[c] { def isEmpty = false; def head = x; def tail = xs; -- cgit v1.2.3