aboutsummaryrefslogtreecommitdiff
path: root/test/dotc/tests.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-11-16 14:50:42 +0100
committerMartin Odersky <odersky@gmail.com>2015-11-16 14:50:42 +0100
commit10ee00edf779fbf8ad74886e523811dd96fbab5e (patch)
treedda5dced27e3cb16e2fe0c1d850ac16bd768ec68 /test/dotc/tests.scala
parentd8c4ab697aa97da509bc2c943a65e4ec78917211 (diff)
downloaddotty-10ee00edf779fbf8ad74886e523811dd96fbab5e.tar.gz
dotty-10ee00edf779fbf8ad74886e523811dd96fbab5e.tar.bz2
dotty-10ee00edf779fbf8ad74886e523811dd96fbab5e.zip
Flag trailing `_' following non-function as an error
If `x` is not a function or method, then `x _` should be disallowed. scalac accepts this and converts it to () => x instead. I'd like to drop this because it's unnecessary and non-obvious. If -language:Scala2 is on, the behavior is like Scala 2's but a migration warning is issued.
Diffstat (limited to 'test/dotc/tests.scala')
-rw-r--r--test/dotc/tests.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala
index 1bd37125f..22981b837 100644
--- a/test/dotc/tests.scala
+++ b/test/dotc/tests.scala
@@ -151,6 +151,7 @@ class tests extends CompilerTest {
@Test def neg_i0248_inherit_refined = compileFile(negDir, "i0248-inherit-refined", xerrors = 4)
@Test def neg_i0281 = compileFile(negDir, "i0281-null-primitive-conforms", xerrors = 3)
@Test def neg_i583 = compileFile(negDir, "i0583-skolemize", xerrors = 2)
+ @Test def neg_i941 = compileFile(negDir, "i941", xerrors = 3)
@Test def neg_finalSealed = compileFile(negDir, "final-sealed", xerrors = 2)
@Test def neg_i705 = compileFile(negDir, "i705-inner-value-class", xerrors = 7)
@Test def neg_i866 = compileFile(negDir, "i866", xerrors = 2)