summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/ant/ScalaTool.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2007-06-05 15:57:59 +0000
committerMartin Odersky <odersky@gmail.com>2007-06-05 15:57:59 +0000
commite51207992f525ed9e32a7a9a39512b4d7e503c03 (patch)
treeb9440d03aed294fde3f8aaa293f60ed98b5de0c1 /src/compiler/scala/tools/ant/ScalaTool.scala
parente060c61b6127ceb2de0e4ce5d3f3d685bc542804 (diff)
downloadscala-e51207992f525ed9e32a7a9a39512b4d7e503c03.tar.gz
scala-e51207992f525ed9e32a7a9a39512b4d7e503c03.tar.bz2
scala-e51207992f525ed9e32a7a9a39512b4d7e503c03.zip
deprecated &f, .f, requires.
Added existential types.
Diffstat (limited to 'src/compiler/scala/tools/ant/ScalaTool.scala')
-rw-r--r--src/compiler/scala/tools/ant/ScalaTool.scala18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/ant/ScalaTool.scala b/src/compiler/scala/tools/ant/ScalaTool.scala
index 0a18098b74..f53363623c 100644
--- a/src/compiler/scala/tools/ant/ScalaTool.scala
+++ b/src/compiler/scala/tools/ant/ScalaTool.scala
@@ -51,7 +51,7 @@ class ScalaTool extends MatchingTask {
abstract class PermissibleValue {
val values: List[String]
def isPermissible(value: String): Boolean =
- (value == "") || values.exists(.startsWith(value))
+ (value == "") || values.exists(_.startsWith(value))
}
/** Defines valid values for the platforms property. */
@@ -222,7 +222,7 @@ class ScalaTool extends MatchingTask {
* @returns The file as a file. */
private def getFile: File =
if (file.isEmpty) error("Member 'file' is empty.")
- else getProject().resolveFile(file.get.toString())
+ else getProject().resolveFile(file.get.toString)
/** Gets the value of the bootclasspath attribute in a Scala-friendly form.
* @returns The boot class path as a list of files. */
@@ -232,7 +232,7 @@ class ScalaTool extends MatchingTask {
/** Gets the value of the bootclasspath attribute in a Scala-friendly form.
* @returns The boot class path as a list of files. */
private def getWinBootClasspath: String =
- bootclasspath.map(.replace('/', '\\')).
+ bootclasspath.map(_.replace('/', '\\')).
mkString("", ";", "")
/** Gets the value of the classpath attribute in a Scala-friendly form.
@@ -243,7 +243,7 @@ class ScalaTool extends MatchingTask {
/** Gets the value of the classpath attribute in a Scala-friendly form.
* @returns The class path as a list of files. */
private def getWinExtClasspath: String =
- extclasspath.map(.replace('/', '\\')).
+ extclasspath.map(_.replace('/', '\\')).
mkString("", ";", "")
/** Gets the value of the classpath attribute in a Scala-friendly form.
@@ -289,15 +289,15 @@ class ScalaTool extends MatchingTask {
token.append(char)
char = chars.next
}
- if (tokens.contains(token.toString()))
- builder.append(tokens(token.toString()))
- else if (token.toString() == "")
+ if (tokens.contains(token.toString))
+ builder.append(tokens(token.toString))
+ else if (token.toString == "")
builder.append('@')
else
- builder.append("@" + token.toString() + "@")
+ builder.append("@" + token.toString + "@")
} else builder.append(char)
}
- builder.toString()
+ builder.toString
}
private def writeFile(file: File, content: String) =