Skip to content

Commit 9ddb9d8

Browse files
authored
Merge pull request #7692 from dotty-staging/fix-#6998
Fix #6998: Make sure to traverse all kinds of untyped trees
2 parents 85dd873 + d2b2414 commit 9ddb9d8

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
@@ -1772,7 +1772,7 @@ object desugar {
17721772
case Block(Nil, expr) =>
17731773
collect(expr)
17741774
case Quote(expr) =>
1775-
new TreeTraverser {
1775+
new UntypedTreeTraverser {
17761776
def traverse(tree: untpd.Tree)(implicit ctx: Context): Unit = tree match {
17771777
case Splice(expr) => collect(expr)
17781778
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)