Fixed issue #313.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@13751 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
dubochet 2008-01-21 15:08:13 +00:00
parent d9252b1a96
commit 9acd33cc68
1 changed files with 1 additions and 1 deletions

View File

@ -547,7 +547,7 @@ sealed abstract class List[+A] extends Seq[A] {
/** Returns the last element of this list.
*
* @return the last element of the list.
* @throws Predef.UnsupportedOperationException if the list is empty.
* @throws Predef.NoSuchElementException if the list is empty.
*/
override def last: A =
if (isEmpty) throw new Predef.NoSuchElementException("Nil.last")