Skip to content

Commit

Permalink
Cleanup warnings
Browse files Browse the repository at this point in the history
Prepare to build against scala 2.13.10
  • Loading branch information
liontiger23 committed Feb 17, 2023
1 parent aeecf6c commit 2ea12c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/main/scala/scala/tools/ant/Scalac.scala
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class Scalac extends ScalaMatchingTask with ScalacShared {

/** Sets the `origin` as a nested src Ant parameter.
* @return An origin path to be configured. */
def createSrc(): Path = createNewPath(origin _, p => origin = p)
def createSrc(): Path = createNewPath(() => origin, p => origin = p)

/** Sets the `origin` as an external reference Ant parameter.
* @param input A reference to an origin path. */
Expand All @@ -234,7 +234,7 @@ class Scalac extends ScalaMatchingTask with ScalacShared {
compilerPath = setOrAppend(compilerPath, input)
}

def createCompilerPath: Path = createNewPath(compilerPath _, p => compilerPath = p)
def createCompilerPath: Path = createNewPath(() => compilerPath, p => compilerPath = p)

/** Sets the `compilerpathref` attribute. Used by [[http://ant.apache.org Ant]].
* @param input The value of `compilerpathref`. */
Expand All @@ -244,7 +244,7 @@ class Scalac extends ScalaMatchingTask with ScalacShared {

/** Sets the `classpath` as a nested classpath Ant parameter.
* @return A class path to be configured. */
def createClasspath(): Path = createNewPath(classpath _, p => classpath = p)
def createClasspath(): Path = createNewPath(() => classpath, p => classpath = p)

/** Sets the `classpath` as an external reference Ant parameter.
* @param input A reference to a class path. */
Expand All @@ -260,7 +260,7 @@ class Scalac extends ScalaMatchingTask with ScalacShared {

/** Sets the `sourcepath` as a nested sourcepath Ant parameter.
* @return A source path to be configured. */
def createSourcepath(): Path = createNewPath(sourcepath _, p => sourcepath = p)
def createSourcepath(): Path = createNewPath(() => sourcepath, p => sourcepath = p)

/** Sets the `sourcepath` as an external reference Ant parameter.
* @param input A reference to a source path. */
Expand All @@ -277,7 +277,7 @@ class Scalac extends ScalaMatchingTask with ScalacShared {

/** Sets the `bootclasspath` as a nested bootclasspath Ant parameter.
* @return A source path to be configured. */
def createBootclasspath(): Path = createNewPath(bootclasspath _, p => bootclasspath = p)
def createBootclasspath(): Path = createNewPath(() => bootclasspath, p => bootclasspath = p)

/** Sets the `bootclasspath` as an external reference Ant
* parameter.
Expand All @@ -293,7 +293,7 @@ class Scalac extends ScalaMatchingTask with ScalacShared {

/** Sets the `extdirs` as a nested extdirs Ant parameter.
* @return An extensions path to be configured. */
def createExtdirs(): Path = createNewPath(extdirs _, p => extdirs = p)
def createExtdirs(): Path = createNewPath(() => extdirs, p => extdirs = p)

/** Sets the `extdirs` as an external reference Ant parameter.
* @param input A reference to an extensions path. */
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/scala/tools/ant/sabbus/Compilers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object Compilers extends scala.collection.Map[String, Compiler] {
}

private def freeMemoryString: String =
(Runtime.getRuntime.freeMemory/1048576.0).formatted("%10.2f") + " MB"
"%10.2f MB".format(Runtime.getRuntime.freeMemory/1048576.0)

def -(key1: String, key2: String, keys: String*): scala.collection.Map[String,scala.tools.ant.sabbus.Compiler] = ???

Expand Down

0 comments on commit 2ea12c3

Please sign in to comment.