diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-11-29 20:08:23 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2017-01-28 19:12:16 +0100 |
commit | d71be28057621750f1ccb168f538c6d942935cac (patch) | |
tree | 444067f87857377eec3a93c368bb3177ce00d23d /compiler/test/dotty | |
parent | adc370df8a584096467ba567c0b75d7cec36fd81 (diff) | |
download | dotty-d71be28057621750f1ccb168f538c6d942935cac.tar.gz dotty-d71be28057621750f1ccb168f538c6d942935cac.tar.bz2 dotty-d71be28057621750f1ccb168f538c6d942935cac.zip |
Fix some dotty compilation errors
Diffstat (limited to 'compiler/test/dotty')
-rw-r--r-- | compiler/test/dotty/partest/DPConsoleRunner.scala | 9 | ||||
-rw-r--r-- | compiler/test/dotty/tools/dotc/parsing/ModifiersParsingTest.scala | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/compiler/test/dotty/partest/DPConsoleRunner.scala b/compiler/test/dotty/partest/DPConsoleRunner.scala index f418d2c37..0ad573792 100644 --- a/compiler/test/dotty/partest/DPConsoleRunner.scala +++ b/compiler/test/dotty/partest/DPConsoleRunner.scala @@ -202,7 +202,7 @@ class DPTestRunner(testFile: File, suiteRunner: DPSuiteRunner) extends nest.Runn import FileManager.joinPaths // compile using command-line javac compiler val args = Seq( - javacCmdPath, + suiteRunner.javacCmdPath, // FIXME: Dotty deviation just writing "javacCmdPath" doesn't work "-d", outDir.getAbsolutePath, "-classpath", @@ -398,8 +398,13 @@ class DPTestRunner(testFile: File, suiteRunner: DPSuiteRunner) extends nest.Runn override def extraClasspath = suiteRunner.fileManager.asInstanceOf[DottyFileManager].extraJarList ::: super.extraClasspath + + // FIXME: Dotty deviation: error if return type is omitted: + // overriding method cleanup in class Runner of type ()Unit; + // method cleanup of type => Boolean | Unit has incompatible type + // override to keep class files if failed and delete clog if ok - override def cleanup = if (lastState.isOk) { + override def cleanup: Unit = if (lastState.isOk) { logFile.delete cLogFile.delete Directory(outDir).deleteRecursively diff --git a/compiler/test/dotty/tools/dotc/parsing/ModifiersParsingTest.scala b/compiler/test/dotty/tools/dotc/parsing/ModifiersParsingTest.scala index 32f842e92..806e1af46 100644 --- a/compiler/test/dotty/tools/dotc/parsing/ModifiersParsingTest.scala +++ b/compiler/test/dotty/tools/dotc/parsing/ModifiersParsingTest.scala @@ -10,11 +10,11 @@ import ast.untpd._ import ast.{ Trees => d } import Parsers.Parser import util.SourceFile -import core.Contexts.ContextBase +import core.Contexts._ import core.Flags object ModifiersParsingTest { - implicit val ctx = (new ContextBase).initialCtx + implicit val ctx: Context = (new ContextBase).initialCtx implicit def parse(code: String): Tree = { val (_, stats) = new Parser(new SourceFile("<meta>", code.toCharArray)).templateStatSeq() |