File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
compiler/src/dotty/tools/dotc/ast Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1550,6 +1550,14 @@ object desugar {
15501550 trees foreach collect
15511551 case Block (Nil , expr) =>
15521552 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)
15531561 case _ =>
15541562 }
15551563 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