File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
compiler/src/dotty/tools/dotc/tastyreflect Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,10 @@ object TastyImpl extends scala.tasty.Tasty {
42
42
def ContextDeco (ctx : Context ): AbstractContext = new AbstractContext {
43
43
def owner : Definition = FromSymbol .definition(ctx.owner)(ctx)
44
44
45
- def source : String = {
45
+ def source : java.net. URI = {
46
46
val thisPath = java.nio.file.Paths .get(" " ).toAbsolutePath
47
47
val path = ctx.compilationUnit.source.file.jpath.toAbsolutePath
48
- thisPath.relativize(path).toString
48
+ thisPath.toUri. relativize(path.toUri)
49
49
}
50
50
}
51
51
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ abstract class Tasty { tasty =>
33
33
def owner : Definition
34
34
35
35
/** Returns the source file being compiled. The path is relative to the current working directory. */
36
- def source : String
36
+ def source : java.net. URI
37
37
}
38
38
implicit def ContextDeco (ctx : Context ): AbstractContext
39
39
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ object SourceFiles {
9
9
10
10
private def getThisFileImpl (implicit u : Universe ): Expr [String ] = {
11
11
import u .tasty ._
12
- u.context.source.toExpr
12
+ u.context.source.toString. toExpr
13
13
}
14
14
15
15
}
You can’t perform that action at this time.
0 commit comments