Skip to content

Commit 044fdab

Browse files
committed
Add missing position
Fixes #13563
1 parent 70ddaa6 commit 044fdab

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class PickleQuotes extends MacroTransform {
102102
tpt match
103103
case Select(t, _) if tpt.symbol == defn.QuotedType_splice =>
104104
// `Type.of[t.Underlying](quotes)` --> `t`
105-
ref(t.symbol)
105+
ref(t.symbol)(using ctx.withSource(tpt.source)).withSpan(tpt.span)
106106
case _ =>
107107
val (splices, tptWithHoles) = makeHoles(tpt)
108108
ReifiedQuote(quotes, tptWithHoles, splices, tpt.tpe, true)

tests/pos-macros/i13563.scala

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import scala.quoted.*
2+
def foo(using Quotes): Unit =
3+
'{ def bar[T](): Unit = ${ summon[Type[T]]; ??? }; () }

0 commit comments

Comments
 (0)