Skip to content

Commit d2b2414

Browse files
committed
Fix #6998: Make sure to traverse all kinds of untyped trees
1 parent 0a33ad3 commit d2b2414

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

compiler/src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1758,7 +1758,7 @@ object desugar {
17581758
case Block(Nil, expr) =>
17591759
collect(expr)
17601760
case Quote(expr) =>
1761-
new TreeTraverser {
1761+
new UntypedTreeTraverser {
17621762
def traverse(tree: untpd.Tree)(implicit ctx: Context): Unit = tree match {
17631763
case Splice(expr) => collect(expr)
17641764
case TypSplice(expr) =>

tests/pos/i6998.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import scala.quoted._
2+
3+
def foo(given QuoteContext) : Unit = {
4+
val '{ $f : (Int => Double) } = ???
5+
}

0 commit comments

Comments
 (0)