Skip to content

Commit

Permalink
Update docs/_docs/reference/metaprogramming/reflection.md
Browse files Browse the repository at this point in the history
Co-authored-by: Jamie Thompson <bishbashboshjt@gmail.com>
[Cherry-picked e7acd53]
  • Loading branch information
som-snytt authored and WojciechMazur committed Jul 9, 2024
1 parent 12023fc commit f0bcf40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/_docs/reference/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 f0bcf40

Please sign in to comment.