diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-02-09 14:28:12 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-02-09 14:28:12 -0800 |
commit | 41cee92bb516c6a9679773ebae88230c30ac67bd (patch) | |
tree | 26ef6d6c26349c1efee232d611cbe41ce1544bcb /test/files | |
parent | 27988cac0aaa681b8dfa8cd8e1fc4f4dd491e812 (diff) | |
parent | 486f92c5ddd6f02cdcd6e32329ce92f90a9fa1c9 (diff) | |
download | scala-41cee92bb516c6a9679773ebae88230c30ac67bd.tar.gz scala-41cee92bb516c6a9679773ebae88230c30ac67bd.tar.bz2 scala-41cee92bb516c6a9679773ebae88230c30ac67bd.zip |
Merge pull request #4263 from lrytz/t9097
SI-9097 Remove spurious warning about conflicting filenames
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t9097.scala | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/files/run/t9097.scala b/test/files/run/t9097.scala new file mode 100644 index 0000000000..d2bf55fc44 --- /dev/null +++ b/test/files/run/t9097.scala @@ -0,0 +1,34 @@ +import scala.tools.partest._ +import java.io.{Console => _, _} + +object Test extends StoreReporterDirectTest { + + override def extraSettings: String = List( + "-usejavacp", + "-Xfatal-warnings", + "-Ybackend:GenBCode", + "-Ydelambdafy:method", + "-Xprint:delambdafy", + s"-d ${testOutput.path}" + ) mkString " " + + override def code = """package o + |package a { + | class C { + | def hihi = List(1,2).map(_ * 2) + | } + |} + |package object a { + | def f = 1 + |} + |""".stripMargin.trim + + override def show(): Unit = { + val baos = new java.io.ByteArrayOutputStream() + Console.withOut(baos)(Console.withErr(baos)(compile())) + assert(!storeReporter.hasErrors, message = filteredInfos map (_.msg) mkString "; ") + val out = baos.toString("UTF-8") + // was 2 before the fix, the two PackageDefs for a would both contain the ClassDef for the closure + assert(out.lines.count(_ contains "class hihi$1") == 1, out) + } +} |