summaryrefslogtreecommitdiff
path: root/test/files/neg/anyval-anyref-parent.check
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2012-02-13 00:02:39 +0100
committerMartin Odersky <odersky@gmail.com>2012-02-13 00:02:39 +0100
commit52c99f57ef41c436719818b8e3860e3bfbf023e2 (patch)
treec5146f24872b6bc70b65f2d64170d09450673ec5 /test/files/neg/anyval-anyref-parent.check
parent7bcb1f2fc98eb870fcd52d3b01b3381e5ce0f8d1 (diff)
downloadscala-52c99f57ef41c436719818b8e3860e3bfbf023e2.tar.gz
scala-52c99f57ef41c436719818b8e3860e3bfbf023e2.tar.bz2
scala-52c99f57ef41c436719818b8e3860e3bfbf023e2.zip
All steps of value class proposal implemented. Most restrictions are now enforced. Super calls and specialized still missing.
Diffstat (limited to 'test/files/neg/anyval-anyref-parent.check')
-rw-r--r--test/files/neg/anyval-anyref-parent.check15
1 files changed, 12 insertions, 3 deletions
diff --git a/test/files/neg/anyval-anyref-parent.check b/test/files/neg/anyval-anyref-parent.check
index be895867ff..e1903f5fcc 100644
--- a/test/files/neg/anyval-anyref-parent.check
+++ b/test/files/neg/anyval-anyref-parent.check
@@ -1,14 +1,23 @@
+anyval-anyref-parent.scala:2: error: Only classes (not traits) are allowed to extend AnyVal
+trait Foo2 extends AnyVal // fail
+ ^
anyval-anyref-parent.scala:5: error: Any does not have a constructor
class Bar1 extends Any // fail
^
-anyval-anyref-parent.scala:9: error: illegal inheritance; superclass Any
+anyval-anyref-parent.scala:6: error: Value class needs to have exactly one public val parameter
+class Bar2(x: Int) extends AnyVal // fail
+ ^
+anyval-anyref-parent.scala:10: error: illegal inheritance; superclass Any
is not a subclass of the superclass Object
of the mixin trait Immutable
trait Foo4 extends Any with Immutable // fail
^
-anyval-anyref-parent.scala:10: error: illegal inheritance; superclass AnyVal
+anyval-anyref-parent.scala:11: error: illegal inheritance; superclass AnyVal
is not a subclass of the superclass Object
of the mixin trait Immutable
trait Foo5 extends AnyVal with Immutable // fail
^
-three errors found
+anyval-anyref-parent.scala:11: error: Only classes (not traits) are allowed to extend AnyVal
+trait Foo5 extends AnyVal with Immutable // fail
+ ^
+6 errors found