diff --git a/compiler/src/dotty/tools/dotc/fromtasty/Debug.scala b/compiler/src/dotty/tools/dotc/fromtasty/Debug.scala index c249f00a2368..f2d9adca1e50 100644 --- a/compiler/src/dotty/tools/dotc/fromtasty/Debug.scala +++ b/compiler/src/dotty/tools/dotc/fromtasty/Debug.scala @@ -6,6 +6,7 @@ import scala.util.control.NonFatal import dotty.tools.io.Directory +import java.io.{File => JFile} import java.nio.file.{Files, Paths} object Debug { @@ -65,7 +66,7 @@ object Debug { private def insertClasspathInArgs(args: List[String], cp: String): List[String] = { val (beforeCp, fromCp) = args.span(_ != "-classpath") - val classpath = fromCp.drop(1).headOption.fold(cp)(_ + ":" + cp) + val classpath = fromCp.drop(1).headOption.fold(cp)(_ + JFile.pathSeparator + cp) "-classpath" :: classpath :: beforeCp ::: fromCp.drop(2) } } diff --git a/compiler/src/dotty/tools/dotc/quoted/QuoteCompiler.scala b/compiler/src/dotty/tools/dotc/quoted/QuoteCompiler.scala index 8fca5cdbb0d7..21b442ac4dfc 100644 --- a/compiler/src/dotty/tools/dotc/quoted/QuoteCompiler.scala +++ b/compiler/src/dotty/tools/dotc/quoted/QuoteCompiler.scala @@ -17,7 +17,7 @@ import dotty.tools.dotc.transform.Staging import dotty.tools.dotc.typer.FrontEnd import dotty.tools.dotc.util.Positions.Position import dotty.tools.dotc.util.SourceFile -import dotty.tools.io.{Path, PlainFile} +import dotty.tools.io.{Path, VirtualFile} import scala.quoted.{Expr, Type} @@ -67,7 +67,7 @@ class QuoteCompiler extends Compiler { */ private def inClass(expr: Expr[_])(implicit ctx: Context): Tree = { val pos = Position(0) - val assocFile = new PlainFile(Path("")) + val assocFile = new VirtualFile("") val cls = ctx.newCompleteClassSymbol(defn.RootClass, outputClassName, EmptyFlags, defn.ObjectType :: Nil, newScope, coord = pos, assocFile = assocFile).entered.asClass