aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliu fengyun <liu@fengy.me>2016-11-27 20:57:43 +0100
committerliu fengyun <liu@fengy.me>2016-11-27 20:57:43 +0100
commit74cee6abb41bf84bd5c037a64ad96d9987746703 (patch)
treec939e84e267148b7e0c3554dec33ad87203e07c4
parent566e8f7d193c855ac78cedfb3723192cb04acb65 (diff)
downloaddotty-74cee6abb41bf84bd5c037a64ad96d9987746703.tar.gz
dotty-74cee6abb41bf84bd5c037a64ad96d9987746703.tar.bz2
dotty-74cee6abb41bf84bd5c037a64ad96d9987746703.zip
fix #1748: desugaring with StringContext in PatDef
-rw-r--r--compiler/src/dotty/tools/dotc/ast/Desugar.scala2
-rw-r--r--tests/pos/i1784.scala14
2 files changed, 16 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/pos/i1784.scala b/tests/pos/i1784.scala
new file mode 100644
index 000000000..9bd487caa
--- /dev/null
+++ b/tests/pos/i1784.scala
@@ -0,0 +1,14 @@
+object Test {
+ implicit class Foo(sc: StringContext) {
+ object q {
+ def unapply(args: Any*): Option[(Any, Any)] =
+ Some((sc.parts(0), sc.parts(1)))
+ }
+ }
+
+ def f(defn: Any): Any = {
+ val q"class $name extends $parent" = defn
+ println(name)
+ println(parent)
+ }
+} \ No newline at end of file