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>
  • Loading branch information
som-snytt and bishabosha authored Jun 25, 2024
1 parent e7acd53 commit 2c7d497
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 2c7d497

Please sign in to comment.