aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-07-02 14:36:36 +0200
committerMartin Odersky <odersky@gmail.com>2015-07-02 14:37:12 +0200
commitf57a6d9db6b8119bef1a78aabef4a527a0f9905c (patch)
tree7ecdb4b69efc356ef13d2e6196937510fa8245bd /test
parent257bf52c3d205359896e3c391274091b3fab732e (diff)
downloaddotty-f57a6d9db6b8119bef1a78aabef4a527a0f9905c.tar.gz
dotty-f57a6d9db6b8119bef1a78aabef4a527a0f9905c.tar.bz2
dotty-f57a6d9db6b8119bef1a78aabef4a527a0f9905c.zip
Check value class member restrictions
According to SIP 15 a value class C must obey the following restrictions: C may not have secondary constructors. C may not declare fields (other than the parameter of a value class). C may not contain object definitions. C may not have initialization statements. These are enforced by this commit. We are still missing restrictions on value class paremeters. We should review what the right set of conditions is (probably we want to admit non-vals, and maybe even multiple parameters).
Diffstat (limited to 'test')
-rw-r--r--test/dotc/tests.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala
index 1cdd9f38a..9b5748a07 100644
--- a/test/dotc/tests.scala
+++ b/test/dotc/tests.scala
@@ -134,7 +134,7 @@ class tests extends CompilerTest {
@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_finalSealed = compileFile(negDir, "final-sealed", xerrors = 2)
- @Test def neg_i705 = compileFile(negDir, "i705-inner-value-class", xerrors = 3)
+ @Test def neg_i705 = compileFile(negDir, "i705-inner-value-class", xerrors = 7)
@Test def neg_moduleSubtyping = compileFile(negDir, "moduleSubtyping", xerrors = 4)
@Test def neg_escapingRefs = compileFile(negDir, "escapingRefs", xerrors = 2)
@Test def neg_instantiateAbstract = compileFile(negDir, "instantiateAbstract", xerrors = 8)