We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c225b1a + 0e6f756 commit 42698aeCopy full SHA for 42698ae
tests/run/tasty-getfile/Macro_1.scala
@@ -1,15 +1,14 @@
1
import scala.quoted._
2
-
3
-import scala.tasty.Universe
+import scala.tasty.{Tasty, TopLevelSplice}
4
5
object SourceFiles {
6
7
implicit inline def getThisFile: String =
8
- ~getThisFileImpl(Universe.compilationUniverse) // FIXME infer Universe.compilationUniverse within top level ~
+ ~getThisFileImpl(TopLevelSplice.tastyContext) // FIXME infer TopLevelSplice.tastyContext within top level ~
9
10
- private def getThisFileImpl(implicit u: Universe): Expr[String] = {
11
- import u.tasty._
12
- u.context.source.getFileName.toString.toExpr
+ private def getThisFileImpl(implicit tasty: Tasty): Expr[String] = {
+ import tasty._
+ rootContext.source.getFileName.toString.toExpr
13
}
14
15
0 commit comments