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 | |
parent | adc370df8a584096467ba567c0b75d7cec36fd81 (diff) | |
download | dotty-d71be28057621750f1ccb168f538c6d942935cac.tar.gz dotty-d71be28057621750f1ccb168f538c6d942935cac.tar.bz2 dotty-d71be28057621750f1ccb168f538c6d942935cac.zip |
Fix some dotty compilation errors
4 files changed, 12 insertions, 6 deletions
diff --git a/compiler/src/dotty/tools/dotc/parsing/Scanners.scala b/compiler/src/dotty/tools/dotc/parsing/Scanners.scala index 101be167e..b75169792 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Scanners.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Scanners.scala @@ -567,7 +567,8 @@ object Scanners { nextChar() getOperatorRest() } else { - error(f"illegal character '\\u${ch: Int}%04x'") + // FIXME: Dotty deviation: f"" interpolator is not supported (#1814) + error("illegal character '\\u%04x'".format(ch: Int)) nextChar() } } diff --git a/compiler/test/dotc/tests.scala b/compiler/test/dotc/tests.scala index 608132bca..6ef6bb741 100644 --- a/compiler/test/dotc/tests.scala +++ b/compiler/test/dotc/tests.scala @@ -61,7 +61,7 @@ class tests extends CompilerTest { List("-classpath", paths) } - implicit val defaultOptions = noCheckOptions ++ { + implicit val defaultOptions: List[String] = noCheckOptions ++ { if (isRunByJenkins) List("-Ycheck:tailrec,resolveSuper,mixin,restoreScopes,labelDef") // should be Ycheck:all, but #725 else List("-Ycheck:tailrec,resolveSuper,mixin,restoreScopes,labelDef") } ++ checkOptions ++ classPath 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() |