diff --git a/compiler/src/dotty/tools/dotc/ast/Desugar.scala b/compiler/src/dotty/tools/dotc/ast/Desugar.scala index 4b2ff1bc313f..c8b1ed909967 100644 --- a/compiler/src/dotty/tools/dotc/ast/Desugar.scala +++ b/compiler/src/dotty/tools/dotc/ast/Desugar.scala @@ -1079,6 +1079,8 @@ object desugar { collect(tree) case Tuple(trees) => trees foreach collect + case Thicket(trees) => + trees foreach collect case _ => } collect(tree) diff --git a/tests/run/i1748.check b/tests/run/i1748.check new file mode 100644 index 000000000000..888299747af9 --- /dev/null +++ b/tests/run/i1748.check @@ -0,0 +1,2 @@ +class + extends diff --git a/tests/run/i1748.scala b/tests/run/i1748.scala new file mode 100644 index 000000000000..bb3df1336563 --- /dev/null +++ b/tests/run/i1748.scala @@ -0,0 +1,14 @@ +object Test { + implicit class Foo(sc: StringContext) { + object q { + def unapply(arg: Any): Option[(Any, Any)] = + Some((sc.parts(0), sc.parts(1))) + } + } + + def main(args: Array[String]): Unit = { + val q"class $name extends $parent" = new Object + println(name) + println(parent) + } +} \ No newline at end of file