diff options
-rw-r--r-- | .classpath | 2 | ||||
-rw-r--r-- | .project | 21 | ||||
-rw-r--r-- | src/library/scala/io/Source.scala | 2 | ||||
-rw-r--r-- | test/files/pos/t2810.scala | 8 |
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"/> @@ -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><project>/.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><project>/.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><project>/.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() = {} } +} |