hello, elements method fixed

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@4876 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
emir 2005-11-05 19:06:12 +00:00
parent f0b201bc24
commit 9f928bf42c
1 changed files with 5 additions and 1 deletions

View File

@ -66,7 +66,11 @@ abstract class MetaData extends Iterable[MetaData] {
def elements = new Iterator[MetaData] {
var x: MetaData = MetaData.this;
def hasNext = Null != x;
def next = x.next;
def next = {
val y = x;
x = x.next;
y
}
}
/** shallow equals method */