Skip to content

Commit 4148093

Browse files
committed
Fix some dotty compilation errors
1 parent 96d1694 commit 4148093

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

compiler/src/dotty/tools/dotc/parsing/Scanners.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ object Scanners {
567567
nextChar()
568568
getOperatorRest()
569569
} else {
570-
error(f"illegal character '\\u${ch: Int}%04x'")
570+
error("illegal character '\\u%04x'".format(ch: Int))
571571
nextChar()
572572
}
573573
}

compiler/test/dotc/tests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class tests extends CompilerTest {
6060
List("-classpath", paths)
6161
}
6262

63-
implicit val defaultOptions = noCheckOptions ++ {
63+
implicit val defaultOptions: List[String] = noCheckOptions ++ {
6464
if (isRunByJenkins) List("-Ycheck:tailrec,resolveSuper,mixin,restoreScopes,labelDef") // should be Ycheck:all, but #725
6565
else List("-Ycheck:tailrec,resolveSuper,mixin,restoreScopes,labelDef")
6666
} ++ checkOptions ++ classPath

compiler/test/dotty/partest/DPConsoleRunner.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class DPTestRunner(testFile: File, suiteRunner: DPSuiteRunner) extends nest.Runn
202202
import FileManager.joinPaths
203203
// compile using command-line javac compiler
204204
val args = Seq(
205-
javacCmdPath,
205+
suiteRunner.javacCmdPath, // FIXME: Dotty deviation just writing "javacCmdPath" doesn't work
206206
"-d",
207207
outDir.getAbsolutePath,
208208
"-classpath",
@@ -398,8 +398,13 @@ class DPTestRunner(testFile: File, suiteRunner: DPSuiteRunner) extends nest.Runn
398398
override def extraClasspath =
399399
suiteRunner.fileManager.asInstanceOf[DottyFileManager].extraJarList ::: super.extraClasspath
400400

401+
402+
// FIXME: Dotty deviation: error if return type is emitted:
403+
// overriding method cleanup in class Runner of type ()Unit;
404+
// method cleanup of type => Boolean | Unit has incompatible type
405+
401406
// override to keep class files if failed and delete clog if ok
402-
override def cleanup = if (lastState.isOk) {
407+
override def cleanup: Unit = if (lastState.isOk) {
403408
logFile.delete
404409
cLogFile.delete
405410
Directory(outDir).deleteRecursively

compiler/test/dotty/tools/dotc/parsing/ModifiersParsingTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import ast.untpd._
1010
import ast.{ Trees => d }
1111
import Parsers.Parser
1212
import util.SourceFile
13-
import core.Contexts.ContextBase
13+
import core.Contexts._
1414
import core.Flags
1515

1616
object ModifiersParsingTest {
17-
implicit val ctx = (new ContextBase).initialCtx
17+
implicit val ctx: Context = (new ContextBase).initialCtx
1818

1919
implicit def parse(code: String): Tree = {
2020
val (_, stats) = new Parser(new SourceFile("<meta>", code.toCharArray)).templateStatSeq()

0 commit comments

Comments
 (0)