Skip to content

Commit 052c3b1

Browse files
michelouallanrenucci
authored andcommitted
Use a VirtualFile in quoted.QuoteCompiler (#5487)
Also replace one usage of `:` by the cross platform path separator
1 parent 145cf52 commit 052c3b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/quoted/QuoteCompiler.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import dotty.tools.dotc.transform.Staging
1717
import dotty.tools.dotc.typer.FrontEnd
1818
import dotty.tools.dotc.util.Positions.Position
1919
import dotty.tools.dotc.util.SourceFile
20-
import dotty.tools.io.{Path, PlainFile}
20+
import dotty.tools.io.{Path, VirtualFile}
2121

2222
import scala.quoted.{Expr, Type}
2323

@@ -67,7 +67,7 @@ class QuoteCompiler extends Compiler {
6767
*/
6868
private def inClass(expr: Expr[_])(implicit ctx: Context): Tree = {
6969
val pos = Position(0)
70-
val assocFile = new PlainFile(Path("<quote>"))
70+
val assocFile = new VirtualFile("<quote>")
7171

7272
val cls = ctx.newCompleteClassSymbol(defn.RootClass, outputClassName, EmptyFlags,
7373
defn.ObjectType :: Nil, newScope, coord = pos, assocFile = assocFile).entered.asClass

0 commit comments

Comments
 (0)