Skip to content

Commit

Permalink
Update docs/_spec/TODOreference/metaprogramming/reflection.md
Browse files Browse the repository at this point in the history
Co-authored-by: Jamie Thompson <bishbashboshjt@gmail.com>
[Cherry-picked 2c7d497]
  • Loading branch information
som-snytt authored and WojciechMazur committed Jul 10, 2024
1 parent e4f8c45 commit efcbfd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/_spec/TODOreference/metaprogramming/reflection.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def macroImpl()(quotes: Quotes): Expr[Unit] =
import quotes.reflect.*
val pos = Position.ofMacroExpansion

val path = pos.sourceFile.path
val jpath = pos.sourceFile.getJPath.getOrElse(report.errorAndAbort("virtual file not supported", pos))
val path = pos.sourceFile.path // fallback for a virtual file
val start = pos.start
val end = pos.end
val startLine = pos.startLine
Expand Down

0 comments on commit efcbfd5

Please sign in to comment.