diff options
author | liu fengyun <liu@fengy.me> | 2016-12-12 13:14:08 +0100 |
---|---|---|
committer | liu fengyun <liu@fengy.me> | 2016-12-12 14:28:23 +0100 |
commit | 628a177f7f5654f4c388b944a098c3723cf7f950 (patch) | |
tree | 06fea542a50a7f37cfd5597e907a4724c8c27d47 /tests/neg/i1779.scala | |
parent | d14de3d7b5955d353ba3108b91ad4eadc6697908 (diff) | |
download | dotty-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.scala | 13 |
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 + } +} |