diff options
author | Martin Odersky <odersky@gmail.com> | 2008-07-09 09:55:15 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-07-09 09:55:15 +0000 |
commit | 323fe887df30250c96c9945e28c1be85441cdc7f (patch) | |
tree | b7a6592179f0927df0ed2ed635d691e2d7330d47 /src/library | |
parent | 1133f0f05f0767ca2548cf49ef633b48f021e6e0 (diff) | |
download | scala-323fe887df30250c96c9945e28c1be85441cdc7f.tar.gz scala-323fe887df30250c96c9945e28c1be85441cdc7f.tar.bz2 scala-323fe887df30250c96c9945e28c1be85441cdc7f.zip |
early initialization fixes.
fix: interface methods read by JavaParser are now deferred. fix: List
extends Product. fixes to Java : _* that make it possible to compile
ObjectRunner without warnings. NEW STARR
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/List.scala | 2 | ||||
-rw-r--r-- | src/library/scala/concurrent/SyncVar.scala | 2 | ||||
-rw-r--r-- | src/library/scala/io/BufferedSource.scala | 3 | ||||
-rw-r--r-- | src/library/scala/xml/parsing/ConstructingParser.scala | 11 |
4 files changed, 8 insertions, 10 deletions
diff --git a/src/library/scala/List.scala b/src/library/scala/List.scala index 23667f68d7..287d552e34 100644 --- a/src/library/scala/List.scala +++ b/src/library/scala/List.scala @@ -442,7 +442,7 @@ object List { * @author Martin Odersky and others * @version 1.0, 16/07/2003 */ -sealed abstract class List[+A] extends Seq[A] { +sealed abstract class List[+A] extends Seq[A] with Product { /** Returns true if the list does not contain any elements. * @return <code>true</code>, iff the list is empty. diff --git a/src/library/scala/concurrent/SyncVar.scala b/src/library/scala/concurrent/SyncVar.scala index c04268990a..dfb619ca2a 100644 --- a/src/library/scala/concurrent/SyncVar.scala +++ b/src/library/scala/concurrent/SyncVar.scala @@ -52,7 +52,7 @@ class SyncVar[A] { /** * @deprecated Will be removed in 2.8. SyncVar should not allow exception by design. */ - def setWithCatch(x: => A) = synchronized { + @deprecated def setWithCatch(x: => A) = synchronized { try { this set x } catch { diff --git a/src/library/scala/io/BufferedSource.scala b/src/library/scala/io/BufferedSource.scala index 99d8d036ae..aca7ea3943 100644 --- a/src/library/scala/io/BufferedSource.scala +++ b/src/library/scala/io/BufferedSource.scala @@ -29,8 +29,9 @@ object BufferedSource { /** constructs a BufferedSource instance from an input stream, using given decoder */ def fromInputStream(inpStream: InputStream, decoder: CharsetDecoder, buffer_size: Int, do_reset: () => Source): BufferedSource = { val byteChannel = Channels.newChannel(inpStream) - return new BufferedSource(byteChannel, decoder) { + return new { val buf_size = buffer_size + } with BufferedSource(byteChannel, decoder) { override def reset = do_reset() def close { inpStream.close } } diff --git a/src/library/scala/xml/parsing/ConstructingParser.scala b/src/library/scala/xml/parsing/ConstructingParser.scala index 020b9892a0..adba52445d 100644 --- a/src/library/scala/xml/parsing/ConstructingParser.scala +++ b/src/library/scala/xml/parsing/ConstructingParser.scala @@ -53,15 +53,12 @@ object parseFromURL { } </pre> */ -class ConstructingParser(inp: Source, presWS:Boolean) -extends { val input = inp } -with ConstructingHandler -with ExternalSources -with MarkupParser { +class ConstructingParser(val input: Source, val preserveWS: Boolean) +extends ConstructingHandler +with ExternalSources +with MarkupParser { // default impl. of Logged override def log(msg: String): Unit = {} - - val preserveWS = presWS } |