summaryrefslogtreecommitdiff
path: root/test/files/neg/anytrait.check
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2012-09-20 18:22:39 +0200
committerGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2012-10-03 13:44:16 +0200
commitef934492df93e0fd3d78e7a3d4f9cccaf765d4d5 (patch)
treee4cedab4789af1180a9be314d422d179f95e0c44 /test/files/neg/anytrait.check
parente9edc69684b3d55a0aef16325e358036c71f4c57 (diff)
downloadscala-ef934492df93e0fd3d78e7a3d4f9cccaf765d4d5.tar.gz
scala-ef934492df93e0fd3d78e7a3d4f9cccaf765d4d5.tar.bz2
scala-ef934492df93e0fd3d78e7a3d4f9cccaf765d4d5.zip
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.
Diffstat (limited to 'test/files/neg/anytrait.check')
-rw-r--r--test/files/neg/anytrait.check4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/files/neg/anytrait.check b/test/files/neg/anytrait.check
index 9dd970b58c..fabe74d379 100644
--- a/test/files/neg/anytrait.check
+++ b/test/files/neg/anytrait.check
@@ -1,7 +1,7 @@
-anytrait.scala:3: error: this statement is not allowed in universal trait extending from class Any: private[this] var x: Int = 1
+anytrait.scala:3: error: field definition is not allowed in universal trait extending from class Any
var x = 1
^
-anytrait.scala:5: error: this statement is not allowed in universal trait extending from class Any: T.this.x_=(T.this.x.+(1))
+anytrait.scala:5: error: this statement is not allowed in universal trait extending from class Any
{ x += 1 }
^
two errors found