diff options
author | paltherr <paltherr@epfl.ch> | 2004-01-13 12:09:23 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-01-13 12:09:23 +0000 |
commit | 2209925d31446c84fe4cec6cec0bd78859070682 (patch) | |
tree | a80ac03763d84cad6a98789ce9eef91f1c3dffe2 /sources | |
parent | 3ce17039386c6f18fe9680d3d92b55e407ade1c2 (diff) | |
download | scala-2209925d31446c84fe4cec6cec0bd78859070682.tar.gz scala-2209925d31446c84fe4cec6cec0bd78859070682.tar.bz2 scala-2209925d31446c84fe4cec6cec0bd78859070682.zip |
- Removed List from Predef
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/Option.scala | 4 | ||||
-rw-r--r-- | sources/scala/Predef.scala | 8 | ||||
-rw-r--r-- | sources/scala/concurrent/pilib.scala | 2 | ||||
-rw-r--r-- | sources/scala/tools/scalac/ast/printer/TextTreePrinter.scala | 14 | ||||
-rw-r--r-- | sources/scala/tools/scalap/AbstractFile.scala | 2 | ||||
-rw-r--r-- | sources/scala/xml/path/Parser.scala | 2 |
6 files changed, 12 insertions, 20 deletions
diff --git a/sources/scala/Option.scala b/sources/scala/Option.scala index 25030ab578..1407f00b4f 100644 --- a/sources/scala/Option.scala +++ b/sources/scala/Option.scala @@ -61,7 +61,7 @@ trait Option[+A] extends Iterable[A] { } def toList: List[A] = match { - case None => Predef.List() - case Some(x) => Predef.List(x) + case None => List() + case Some(x) => List(x) } } diff --git a/sources/scala/Predef.scala b/sources/scala/Predef.scala index e24829312e..b1533ba731 100644 --- a/sources/scala/Predef.scala +++ b/sources/scala/Predef.scala @@ -38,14 +38,6 @@ object Predef { array; } - /** Create a list with given elements. - * - * @param xs the elements to put in the list - * @return the list containing elements xs. - */ - def List[A](xs: A*): List[A] = xs.asInstanceOf[List[A]]; - val List = scala.List; - def error(message: String): All = throw new Error(message); def exit: scala.Unit = java.lang.System.exit(0); diff --git a/sources/scala/concurrent/pilib.scala b/sources/scala/concurrent/pilib.scala index 97c7a0020a..724268fce8 100644 --- a/sources/scala/concurrent/pilib.scala +++ b/sources/scala/concurrent/pilib.scala @@ -141,7 +141,7 @@ object pilib with Monitor { */ private def compare(s1: Sum, ss: List[Sum]): List[Sum] = ss match { - case Nil => ss ::: Predef.List(s1) + case Nil => ss ::: List(s1) case s2 :: rest => matches(s1.gs, s2.gs) match { case None => s2 :: compare(s1, rest) case Some(Triple(log, c1, c2)) => { diff --git a/sources/scala/tools/scalac/ast/printer/TextTreePrinter.scala b/sources/scala/tools/scalac/ast/printer/TextTreePrinter.scala index 2b301cd055..d073ec135a 100644 --- a/sources/scala/tools/scalac/ast/printer/TextTreePrinter.scala +++ b/sources/scala/tools/scalac/ast/printer/TextTreePrinter.scala @@ -178,19 +178,19 @@ class TextTreePrinter(writer: PrintWriter) with TreePrinter { protected final val TXT_AT = Simple("@"); protected final val TXT_WITH_SP = - Sequence(Predef.List(Space, KW_WITH, Space)); + Sequence(List(Space, KW_WITH, Space)); protected final val TXT_BLOCK_BEGIN = - Sequence(Predef.List(TXT_LEFT_BRACE, Newline)); + Sequence(List(TXT_LEFT_BRACE, Newline)); protected final val TXT_BLOCK_END = - Sequence(Predef.List(Newline, TXT_RIGHT_BRACE)); + Sequence(List(Newline, TXT_RIGHT_BRACE)); protected final val TXT_BLOCK_SEP = - Sequence(Predef.List(TXT_SEMICOLON, Newline)); + Sequence(List(TXT_SEMICOLON, Newline)); protected final val TXT_COMMA_SP = - Sequence(Predef.List(TXT_COMMA, Space)); + Sequence(List(TXT_COMMA, Space)); protected final val TXT_ELSE_NL = - Sequence(Predef.List(KW_ELSE, Newline)); + Sequence(List(KW_ELSE, Newline)); protected final val TXT_BAR_SP = - Sequence(Predef.List(Space, TXT_BAR, Space)); + Sequence(List(Space, TXT_BAR, Space)); def print(global: scalac_Global): unit = { val phase: Phase = global.currentPhase; diff --git a/sources/scala/tools/scalap/AbstractFile.scala b/sources/scala/tools/scalap/AbstractFile.scala index 6ab11352fb..bf959ee2af 100644 --- a/sources/scala/tools/scalap/AbstractFile.scala +++ b/sources/scala/tools/scalap/AbstractFile.scala @@ -158,7 +158,7 @@ class JarArchive(f: File) with AbstractFile { Iterator.empty; else if (j < (pref.length() - 1)) { if (files.isDefinedAt(pref.substring(j))) - Predef.List(pref).elements; + List(pref).elements; else Iterator.empty; } else diff --git a/sources/scala/xml/path/Parser.scala b/sources/scala/xml/path/Parser.scala index 88d3271d90..b675e4396f 100644 --- a/sources/scala/xml/path/Parser.scala +++ b/sources/scala/xml/path/Parser.scala @@ -44,7 +44,7 @@ class Parser( it:Iterator[char] ) with Scanner( it ) { def conds = token match { case LBRACKET => nextToken; - var cond :List[List[Expression]] = Predef.List( expr ); + var cond :List[List[Expression]] = List( expr ); while( COMMA == token ) { cond = expr :: cond } acc( RBRACKET ); Some( cond.reverse ) |