From ef934492df93e0fd3d78e7a3d4f9cccaf765d4d5 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 20 Sep 2012 18:22:39 +0200 Subject: Revised restrictions for value classes and unversal traits and brought compiler in line with them. One thing we can accept IMO are nested classes (nested objects are still a problem). In fact, it makes no sense to exclude nested classes from value classes but not from universal traits. A class nested in universal trait will becomes a class nested in a value class by inheritance. Note that the reflection library already contains a universal trait with a nested class (IndexedSeqLike), so we should accept them if we can. --- test/files/neg/t5799.check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/files/neg/t5799.check') diff --git a/test/files/neg/t5799.check b/test/files/neg/t5799.check index 10e2658d56..3b43d06a94 100644 --- a/test/files/neg/t5799.check +++ b/test/files/neg/t5799.check @@ -1,4 +1,4 @@ -t5799.scala:2: error: value class may not have secondary constructors +t5799.scala:2: error: secondary constructor is not allowed in value class def this(s: String) = this(s.toDouble) ^ one error found -- cgit v1.2.3