summaryrefslogtreecommitdiff
path: root/test/files/run/t3895b.scala
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@epfl.ch>2010-10-20 13:26:11 +0000
committerHubert Plociniczak <hubert.plociniczak@epfl.ch>2010-10-20 13:26:11 +0000
commit2014160121a62681bdc0e873a3f7e9b5e3bbae16 (patch)
tree5da2d4ad44f798bbf210f583139b302390ff8c8e /test/files/run/t3895b.scala
parentadd9be644fd7b2864e4dcdd792980622622c934a (diff)
downloadscala-2014160121a62681bdc0e873a3f7e9b5e3bbae16.tar.gz
scala-2014160121a62681bdc0e873a3f7e9b5e3bbae16.tar.bz2
scala-2014160121a62681bdc0e873a3f7e9b5e3bbae16.zip
Closes #3059, #3895 (the only difference betwee...
Closes #3059, #3895 (the only difference between this and r23232 is the forced info transformation that ensures that nested objects are viewed as lazy vals). sbt integration requires new starr for this commit to work.
Diffstat (limited to 'test/files/run/t3895b.scala')
-rw-r--r--test/files/run/t3895b.scala30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/files/run/t3895b.scala b/test/files/run/t3895b.scala
new file mode 100644
index 0000000000..fd74aab125
--- /dev/null
+++ b/test/files/run/t3895b.scala
@@ -0,0 +1,30 @@
+class DryRun
+{
+ import scala.tools.nsc.{Global, Settings, CompilerCommand}
+ import scala.tools.nsc.reporters.ConsoleReporter
+
+ val settings = new Settings()
+ settings.classpath.value = System.getProperty("java.class.path")
+ val command = new CompilerCommand(List(), settings)
+ val reporter = new ConsoleReporter(settings, scala.Console.in, new java.io.PrintWriter(new java.io.PrintStream(scala.Console.out)))
+ object compiler extends Global(command.settings, reporter)
+ {
+ object test1
+ lazy val test2 = 1
+ object test3
+
+ }
+ def test {
+ compiler.test1
+ compiler.test2
+ compiler.test3
+ val run = new compiler.Run
+ run compile command.files
+ }
+}
+
+object Test {
+ def main(args: Array[String]) {
+ new DryRun().test
+ }
+}