diff options
-rw-r--r-- | compiler/src/dotty/tools/dotc/ast/Desugar.scala | 2 | ||||
-rw-r--r-- | tests/run/i1748.check | 2 | ||||
-rw-r--r-- | tests/run/i1748.scala | 14 |
3 files changed, 18 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/ast/Desugar.scala b/compiler/src/dotty/tools/dotc/ast/Desugar.scala index 4b2ff1bc3..c8b1ed909 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 000000000..888299747 --- /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 000000000..bb3df1336 --- /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 |