summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksandar Pokopec <aleksandar.prokopec@epfl.ch>2010-01-11 16:09:36 +0000
committerAleksandar Pokopec <aleksandar.prokopec@epfl.ch>2010-01-11 16:09:36 +0000
commit998a7b758fc4dc573abdeae0adc301623b393507 (patch)
tree086d518dd18eeb1b1c4824f40207f25dbdcf9586
parent250b45a1246a1e83e76cabd5e5251510ae3074ee (diff)
downloadscala-998a7b758fc4dc573abdeae0adc301623b393507.tar.gz
scala-998a7b758fc4dc573abdeae0adc301623b393507.tar.bz2
scala-998a7b758fc4dc573abdeae0adc301623b393507.zip
Fixed #2810.
no review
-rw-r--r--.classpath2
-rw-r--r--.project21
-rw-r--r--src/library/scala/io/Source.scala2
-rw-r--r--test/files/pos/t2810.scala8
4 files changed, 29 insertions, 4 deletions
diff --git a/.classpath b/.classpath
index dbbacc419b..b2cddcbc4f 100644
--- a/.classpath
+++ b/.classpath
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/compiler"/>
+ <classpathentry kind="src" path="test/files"/>
+ <classpathentry kind="src" path="src/library"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry exported="true" kind="lib" path="lib/msil.jar"/>
<classpathentry kind="lib" path="lib/jline.jar"/>
diff --git a/.project b/.project
index 71b4782bbe..0267f300e1 100644
--- a/.project
+++ b/.project
@@ -6,18 +6,33 @@
</projects>
<buildSpec>
<buildCommand>
- <name>ch.epfl.lamp.sdt.core.scalabuilder</name>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>full,incremental,</triggers>
<arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value>&lt;project&gt;/.externalToolBuilders/ch.epfl.lamp.sdt.core.scalabuilder.launch</value>
+ </dictionary>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>full,incremental,</triggers>
<arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value>&lt;project&gt;/.externalToolBuilders/org.eclipse.pde.ManifestBuilder.launch</value>
+ </dictionary>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>full,incremental,</triggers>
<arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value>&lt;project&gt;/.externalToolBuilders/org.eclipse.pde.SchemaBuilder.launch</value>
+ </dictionary>
</arguments>
</buildCommand>
</buildSpec>
diff --git a/src/library/scala/io/Source.scala b/src/library/scala/io/Source.scala
index e5cf73ff44..e88bfd0bf1 100644
--- a/src/library/scala/io/Source.scala
+++ b/src/library/scala/io/Source.scala
@@ -313,7 +313,7 @@ abstract class Source extends Iterator[Char]
}
/** The close() method closes the underlying resource. */
- def close: Unit =
+ def close(): Unit =
if (closeFunction != null) closeFunction()
/** The reset() method creates a fresh copy of this Source. */
diff --git a/test/files/pos/t2810.scala b/test/files/pos/t2810.scala
new file mode 100644
index 0000000000..c85eca164a
--- /dev/null
+++ b/test/files/pos/t2810.scala
@@ -0,0 +1,8 @@
+
+
+
+
+object Test {
+ val closeable1: { def close(): Unit } = new scala.io.Source { val iter: Iterator[Char] = "".iterator }
+ val closeable2: { def close(): Unit } = new java.io.Closeable { def close() = {} }
+}