Skip to content

Commit

Permalink
Merge commit '00343bc' into 2.13.x
Browse files Browse the repository at this point in the history
  • Loading branch information
adriaanm committed Jun 20, 2019
2 parents 057faa5 + 00343bc commit c324903
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 8 deletions.
13 changes: 8 additions & 5 deletions src/compiler/scala/tools/nsc/CompilerCommand.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

package scala.tools.nsc

import java.nio.file.Files

import io.File

/** A class representing command line info for scalac */
Expand Down Expand Up @@ -130,11 +132,12 @@ class CompilerCommand(arguments: List[String], val settings: Settings) {
*/
def expandArg(arg: String): List[String] = {
def stripComment(s: String) = s takeWhile (_ != '#')
val file = File(arg stripPrefix "@")
if (!file.exists)
throw new java.io.FileNotFoundException("argument file %s could not be found" format file.name)

settings splitParams (file.lines() map stripComment mkString " ")
import java.nio.file._
import collection.JavaConverters._
val file = Paths.get(arg stripPrefix "@")
if (!Files.exists(file))
throw new java.io.FileNotFoundException("argument file %s could not be found" format file)
settings splitParams (Files.readAllLines(file).asScala map stripComment mkString " ")
}

// override this if you don't want arguments processed here
Expand Down
2 changes: 1 addition & 1 deletion src/library/scala/deprecated.scala
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ import scala.annotation.meta._
* @see [[scala.deprecatedOverriding]]
* @see [[scala.deprecatedName]]
*/
@getter @setter @beanGetter @beanSetter
@getter @setter @beanGetter @beanSetter @field
@deprecatedInheritance("Scheduled for being final in 2.14", "2.13.0")
class deprecated(message: String = "", since: String = "") extends scala.annotation.StaticAnnotation
1 change: 1 addition & 0 deletions test/files/pos/t11538.flags
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Xfatal-warnings -deprecation -stop:refchecks
13 changes: 13 additions & 0 deletions test/files/pos/t11538.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package t11538

@deprecated("not for you", since = "just now")
class Abhorrent

object Bizzle {
@deprecated("use mipple instead", since = "recently")
val wibble: Abhorrent = mipple
@deprecated("use wobble instead", since = "recently")
def mipple: Abhorrent = wobble
@deprecated("use wibble instead", since = "recently")
var wobble: Abhorrent = wibble
}
4 changes: 2 additions & 2 deletions test/junit/scala/tools/nsc/PipelineMainTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ class PipelineMainTest {
class CleanVisitor() extends SimpleFileVisitor[Path] {
override def preVisitDirectory(dir: Path, attrs: BasicFileAttributes): FileVisitResult = {
if (dir.getFileName.toString == "target") {
deleteRecursive(dir)
Files.createDirectories(dir)
for (p <- Files.list(dir).iterator.asScala)
deleteRecursive(p)
FileVisitResult.SKIP_SUBTREE
} else super.preVisitDirectory(dir, attrs)
}
Expand Down

0 comments on commit c324903

Please sign in to comment.