summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-05-08 08:06:15 -0700
committerPaul Phillips <paulp@improving.org>2013-05-08 08:06:15 -0700
commitb0758f5cb9d966b940933d48bdbb45d17a80de66 (patch)
treec7c906ea3085bef3d6e493faa7f1ac54c370e185 /test/files
parent9a2f6c75cce22565b994c0b8bd2af8acc6e6f178 (diff)
downloadscala-b0758f5cb9d966b940933d48bdbb45d17a80de66.tar.gz
scala-b0758f5cb9d966b940933d48bdbb45d17a80de66.tar.bz2
scala-b0758f5cb9d966b940933d48bdbb45d17a80de66.zip
SI-6039 Harden against irrelevant filesystem details
The symbol loader need not create and populate package symbols merely because there is a directory somewhere. Every package created based on the existence of a directory should contain a classfile, either directly or indirectly.
Diffstat (limited to 'test/files')
-rw-r--r--test/files/run/t6039.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/files/run/t6039.scala b/test/files/run/t6039.scala
new file mode 100644
index 0000000000..9d811b0634
--- /dev/null
+++ b/test/files/run/t6039.scala
@@ -0,0 +1,18 @@
+import scala.tools.partest._
+
+object Test extends StoreReporterDirectTest {
+ private def compileCode(): Boolean = {
+ new java.io.File("util") mkdirs
+ val classpath = List(sys.props("partest.lib"), ".") mkString sys.props("path.separator")
+ log(s"classpath = $classpath")
+ compileString(newCompiler("-cp", classpath, "-d", testOutput.path))(packageCode)
+ }
+ def code = ???
+ def packageCode = """
+package scala.bippy
+class A { new util.Random() }
+"""
+ def show(): Unit = {
+ assert(compileCode(), filteredInfos take 1 mkString "")
+ }
+}