aboutsummaryrefslogtreecommitdiff
path: root/tests/neg
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-08-22 09:19:39 +0200
committerMartin Odersky <odersky@gmail.com>2013-08-22 09:19:39 +0200
commit1acfcd150ebf91cc3609634a703c80c9628c434a (patch)
tree9723404bafa91a1e39bb1a93ebab5944be53bb5b /tests/neg
parentdb35ebf5519fe1c7f2f2870691139edc93c3d0a3 (diff)
downloaddotty-1acfcd150ebf91cc3609634a703c80c9628c434a.tar.gz
dotty-1acfcd150ebf91cc3609634a703c80c9628c434a.tar.bz2
dotty-1acfcd150ebf91cc3609634a703c80c9628c434a.zip
Added some first test files to compile
Diffstat (limited to 'tests/neg')
-rw-r--r--tests/neg/Main.scala23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/neg/Main.scala b/tests/neg/Main.scala
new file mode 100644
index 000000000..2cc7ad50e
--- /dev/null
+++ b/tests/neg/Main.scala
@@ -0,0 +1,23 @@
+/* NSC -- new Scala compiler
+ * Copyright 2005-2013 LAMP/EPFL
+ * @author Martin Odersky
+ */
+package dotty.tools
+package dotc
+
+import core.Contexts.Context
+
+object Main extends Driver {
+ def resident(compiler: Compiler): Unit = unsupported("resident") /*loop { line =>
+ val command = new CompilerCommand(line split "\\s+" toList, new Settings(scalacError))
+ compiler.reporter.reset()
+ new compiler.Run() compile command.files
+ }*/
+
+ override def newCompiler(): Compiler = new Compiler
+
+ override def doCompile(compiler: Compiler, fileNames: List[String])(implicit ctx: Context): Unit = {
+ if (new config.Settings.Setting.SettingDecorator(ctx.base.settings.resident).value) resident(compiler)
+ else super.doCompile(compiler,123)
+ }
+}