aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/i1779.scala
diff options
context:
space:
mode:
authorliu fengyun <liu@fengy.me>2016-12-12 13:14:08 +0100
committerliu fengyun <liu@fengy.me>2016-12-12 14:28:23 +0100
commit628a177f7f5654f4c388b944a098c3723cf7f950 (patch)
tree06fea542a50a7f37cfd5597e907a4724c8c27d47 /tests/neg/i1779.scala
parentd14de3d7b5955d353ba3108b91ad4eadc6697908 (diff)
downloaddotty-628a177f7f5654f4c388b944a098c3723cf7f950.tar.gz
dotty-628a177f7f5654f4c388b944a098c3723cf7f950.tar.bz2
dotty-628a177f7f5654f4c388b944a098c3723cf7f950.zip
only allow $_ in patterns
Diffstat (limited to 'tests/neg/i1779.scala')
-rw-r--r--tests/neg/i1779.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/neg/i1779.scala b/tests/neg/i1779.scala
new file mode 100644
index 000000000..92100fa06
--- /dev/null
+++ b/tests/neg/i1779.scala
@@ -0,0 +1,13 @@
+object Test {
+ implicit class Foo(sc: StringContext) {
+ object q {
+ def apply(arg: Any*): Int = 3
+ }
+ }
+
+ def f = {
+ val _parent = 3
+ q"val hello = $_parent"
+ q"class $_" // error // error
+ }
+}