File tree 2 files changed +20
-0
lines changed
compiler/src/dotty/tools/dotc/ast
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1550,6 +1550,14 @@ object desugar {
1550
1550
trees foreach collect
1551
1551
case Block (Nil , expr) =>
1552
1552
collect(expr)
1553
+ case Quote (expr) =>
1554
+ new TreeTraverser {
1555
+ def traverse (tree : untpd.Tree )(implicit ctx : Context ): Unit = tree match {
1556
+ case Splice (expr) => collect(expr)
1557
+ case TypSplice (expr) => collect(expr)
1558
+ case _ => traverseChildren(tree)
1559
+ }
1560
+ }.traverse(expr)
1553
1561
case _ =>
1554
1562
}
1555
1563
collect(tree)
Original file line number Diff line number Diff line change
1
+ class Foo {
2
+ import scala .quoted ._
3
+ import scala .quoted .matching ._
4
+ def f (sc : quoted.Expr [StringContext ]) given tasty .Reflection : Unit = {
5
+
6
+ val ' { StringContext ($ {parts}: _* ) } = sc
7
+ val ps0 : Expr [Seq [String ]] = parts
8
+
9
+ val ' { StringContext ($ {ExprSeq (parts2)}: _* ) } = sc
10
+ val ps : Seq [Expr [String ]] = parts2
11
+ }
12
+ }
You can’t perform that action at this time.
0 commit comments