summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2012-07-30 05:41:48 -0700
committerodersky <odersky@gmail.com>2012-07-30 05:41:48 -0700
commit8e62dc93e2756db569fa00b50a80deba0fc1eece (patch)
treef601617de25fea6cd847822397eabf53126ba915 /test/files/neg
parente77dbfc774b929df78aa408e86bce7eeec1271ee (diff)
parentdaf0953c1f5d76b468a75911f3f22162d631415c (diff)
downloadscala-8e62dc93e2756db569fa00b50a80deba0fc1eece.tar.gz
scala-8e62dc93e2756db569fa00b50a80deba0fc1eece.tar.bz2
scala-8e62dc93e2756db569fa00b50a80deba0fc1eece.zip
Merge pull request #1013 from odersky/ticket/5878
Closes SI-5878
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/t5878.check13
-rw-r--r--test/files/neg/t5878.scala6
2 files changed, 19 insertions, 0 deletions
diff --git a/test/files/neg/t5878.check b/test/files/neg/t5878.check
new file mode 100644
index 0000000000..50dba0d272
--- /dev/null
+++ b/test/files/neg/t5878.check
@@ -0,0 +1,13 @@
+t5878.scala:1: error: value class may not unbox to itself
+case class Foo(x: Bar) extends AnyVal
+ ^
+t5878.scala:2: error: value class may not unbox to itself
+case class Bar(x: Foo) extends AnyVal
+ ^
+t5878.scala:4: error: value class may not unbox to itself
+class Foo1(val x: Bar1) extends AnyVal
+ ^
+t5878.scala:5: error: value class may not unbox to itself
+class Bar1(val x: Foo1) extends AnyVal
+ ^
+four errors found
diff --git a/test/files/neg/t5878.scala b/test/files/neg/t5878.scala
new file mode 100644
index 0000000000..b4e33627ef
--- /dev/null
+++ b/test/files/neg/t5878.scala
@@ -0,0 +1,6 @@
+case class Foo(x: Bar) extends AnyVal
+case class Bar(x: Foo) extends AnyVal
+
+class Foo1(val x: Bar1) extends AnyVal
+class Bar1(val x: Foo1) extends AnyVal
+