We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7acd53 commit 2c7d497Copy full SHA for 2c7d497
docs/_spec/TODOreference/metaprogramming/reflection.md
@@ -82,7 +82,8 @@ def macroImpl()(quotes: Quotes): Expr[Unit] =
82
import quotes.reflect.*
83
val pos = Position.ofMacroExpansion
84
85
- val path = pos.sourceFile.path
+ val jpath = pos.sourceFile.getJPath.getOrElse(report.errorAndAbort("virtual file not supported", pos))
86
+ val path = pos.sourceFile.path // fallback for a virtual file
87
val start = pos.start
88
val end = pos.end
89
val startLine = pos.startLine
0 commit comments