aboutsummaryrefslogtreecommitdiff
path: root/test/dotc/tests.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-03-16 12:39:56 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-03-20 13:02:29 +0100
commit574a148fd561a793ee522c2be18ee02214236d80 (patch)
tree34d99eaeed0a35d549c04d8db3ec409e9293baed /test/dotc/tests.scala
parentbff6b093d28bfc6918fa86d640353ba60b1a24e4 (diff)
downloaddotty-574a148fd561a793ee522c2be18ee02214236d80.tar.gz
dotty-574a148fd561a793ee522c2be18ee02214236d80.tar.bz2
dotty-574a148fd561a793ee522c2be18ee02214236d80.zip
Added auto-tupling.
Auto-tupling should satisfy the following spec. 1. An application `f(args)` where `f` is a non-overloaded method which has a single, non-repeated parameter as its first parameter list and where args consists of two or more arguments is expanded to `f((args))`. 2. A constructor pattern `C(args)` where `C.unapply` is a non-overloaded method which has a single, non-repeated parameter as its first parameter list and where args consists of two or more arguments is expanded to `C((args))`. Auto-tupling can be disabled by language feature "noAutoTupling". Conflicts: test/dotc/tests.scala
Diffstat (limited to 'test/dotc/tests.scala')
-rw-r--r--test/dotc/tests.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala
index 54d9cfca6..21db07bd3 100644
--- a/test/dotc/tests.scala
+++ b/test/dotc/tests.scala
@@ -57,6 +57,8 @@ class tests extends CompilerTest {
@Test def neg_i39 = compileFile(negDir, "i39", xerrors = 1)
@Test def neg_i50_volatile = compileFile(negDir, "i50-volatile", xerrors = 4)
@Test def neg_companions = compileFile(negDir, "companions", xerrors = 1)
+ @Test def neg_autoTupling = compileFile(posDir, "autoTuplingTest", "-language:noAutoTupling" :: Nil, xerrors = 3)
+ @Test def neg_autoTupling2 = compileFile(negDir, "autoTuplingTest", xerrors = 3)
@Test def dotc = compileDir(dotcDir + "tools/dotc", twice)
@Test def dotc_ast = compileDir(dotcDir + "tools/dotc/ast", twice)