diff options
author | Matthias Zenger <mzenger@gmail.com> | 2003-06-27 13:56:04 +0000 |
---|---|---|
committer | Matthias Zenger <mzenger@gmail.com> | 2003-06-27 13:56:04 +0000 |
commit | ecd251a20eab9b60e092982dbf0951d354d03866 (patch) | |
tree | aa3adbbaf34cc0bf55717e94686ce611f41cb7b7 | |
parent | 0e53b38aed8bed504c0463b4fd1a9d6fe3699dd7 (diff) | |
download | scala-ecd251a20eab9b60e092982dbf0951d354d03866.tar.gz scala-ecd251a20eab9b60e092982dbf0951d354d03866.tar.bz2 scala-ecd251a20eab9b60e092982dbf0951d354d03866.zip |
It seems like the compiler cannot handle "null"...
It seems like the compiler cannot handle "null" properly... I changed it
to an error.
-rw-r--r-- | sources/scala/MutableList.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/scala/MutableList.scala b/sources/scala/MutableList.scala index d30a388634..d15b6c3739 100644 --- a/sources/scala/MutableList.scala +++ b/sources/scala/MutableList.scala @@ -21,7 +21,7 @@ class MutableList[A] with Seq[A] with PartialFunction[Int, A] { def isDefinedAt(n: Int) = (n >= 0) && (n < len); def apply(n: Int): A = get(n) match { - case None => null + case None => error("element not found") case Some(value) => value } |