diff options
author | Martin Odersky <odersky@gmail.com> | 2007-04-30 11:48:45 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-04-30 11:48:45 +0000 |
commit | 12a2b3b7ebd680b7a461209c505ccab82b86b66b (patch) | |
tree | d502b0c1364a45ae44e5937b95d300bfec6b50f5 /src/library | |
parent | f9454ad5cebd35bf1bd9998521e1acf775513c11 (diff) | |
download | scala-12a2b3b7ebd680b7a461209c505ccab82b86b66b.tar.gz scala-12a2b3b7ebd680b7a461209c505ccab82b86b66b.tar.bz2 scala-12a2b3b7ebd680b7a461209c505ccab82b86b66b.zip |
fixed bugs 1072, 1067, 1055, 997
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/Iterable.scala | 2 | ||||
-rw-r--r-- | src/library/scala/xml/Node.scala | 18 |
2 files changed, 16 insertions, 4 deletions
diff --git a/src/library/scala/Iterable.scala b/src/library/scala/Iterable.scala index 934afd685f..48bbf9eb9c 100644 --- a/src/library/scala/Iterable.scala +++ b/src/library/scala/Iterable.scala @@ -411,6 +411,8 @@ trait Iterable[+A] { buf.append(end) } + def addString(buf: StringBuilder, sep: String): StringBuilder = addString(buf, "", sep, "") + /** Fills the given array <code>xs</code> with the elements of * this sequence starting at position <code>start</code>. * diff --git a/src/library/scala/xml/Node.scala b/src/library/scala/xml/Node.scala index d40ed6a0b3..1d424395b2 100644 --- a/src/library/scala/xml/Node.scala +++ b/src/library/scala/xml/Node.scala @@ -140,8 +140,13 @@ abstract class Node extends NodeSeq { /** * Returns a hashcode. A standard implementation of hashcodes is obtained by calling * Utility.hashCode(pre, label, attributes.hashCode(), child); + * Martin to Burak: to do: if you make this method abstract, the compiler will now + * complain if there's no implementation in a subclass. Is this what we want? Note that + * this would break doc/DocGenator and doc/ModelToXML, with an error message like: +doc/ModelToXML.scala:95: error: object creation impossible, since there is a deferred declaration of method hashCode in class Node of type ()Int which is not implemented in a subclass + new SpecialNode { */ - override def hashCode(): Int + override def hashCode(): Int = super.hashCode // implementations of NodeSeq methods @@ -189,7 +194,12 @@ abstract class Node extends NodeSeq { * Returns a text representation of this node. Note that this is not equivalent to * the XPath node-test called text(), it is rather an implementation of the * XPath function string() - */ - override def text: String - + * Martin to Burak: to do: if you make this method abstract, the compiler will now + * complain if there's no implementation in a subclass. Is this what we want? Note that + * this would break doc/DocGenator and doc/ModelToXML, with an error message like: +doc\DocGenerator.scala:1219: error: object creation impossible, since there is a deferred declaration of method text in class Node of type => String which is not implemented in a subclass + new SpecialNode { + ^ + */ + override def text: String = super.text } |