From d14de3d7b5955d353ba3108b91ad4eadc6697908 Mon Sep 17 00:00:00 2001 From: liu fengyun Date: Thu, 8 Dec 2016 21:15:34 +0100 Subject: fix #1779: support $_ and $_id in interpolated string --- tests/run/i1779.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/run/i1779.scala (limited to 'tests/run/i1779.scala') diff --git a/tests/run/i1779.scala b/tests/run/i1779.scala new file mode 100644 index 000000000..e81bc97b6 --- /dev/null +++ b/tests/run/i1779.scala @@ -0,0 +1,13 @@ +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 $_ extends $_parent" = new Object + println(_parent) + } +} -- cgit v1.2.3