aboutsummaryrefslogtreecommitdiff
path: root/tests/run/i1748.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/i1748.scala')
-rw-r--r--tests/run/i1748.scala14
1 files changed, 14 insertions, 0 deletions
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