diff options
author | liu fengyun <liu@fengy.me> | 2016-11-27 20:57:43 +0100 |
---|---|---|
committer | liu fengyun <liu@fengy.me> | 2016-11-27 20:57:43 +0100 |
commit | 74cee6abb41bf84bd5c037a64ad96d9987746703 (patch) | |
tree | c939e84e267148b7e0c3554dec33ad87203e07c4 /tests | |
parent | 566e8f7d193c855ac78cedfb3723192cb04acb65 (diff) | |
download | dotty-74cee6abb41bf84bd5c037a64ad96d9987746703.tar.gz dotty-74cee6abb41bf84bd5c037a64ad96d9987746703.tar.bz2 dotty-74cee6abb41bf84bd5c037a64ad96d9987746703.zip |
fix #1748: desugaring with StringContext in PatDef
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/i1784.scala | 14 |
1 files changed, 14 insertions, 0 deletions
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 |