summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Zenger <mzenger@gmail.com>2003-06-27 13:56:04 +0000
committerMatthias Zenger <mzenger@gmail.com>2003-06-27 13:56:04 +0000
commitecd251a20eab9b60e092982dbf0951d354d03866 (patch)
treeaa3adbbaf34cc0bf55717e94686ce611f41cb7b7
parent0e53b38aed8bed504c0463b4fd1a9d6fe3699dd7 (diff)
downloadscala-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.scala2
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
}