summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-10-05 02:59:24 +0000
committerPaul Phillips <paulp@improving.org>2010-10-05 02:59:24 +0000
commitc1f8dbca52899f87128ece2f5d137fb91206ede7 (patch)
treeb4d379010c9279f420dab36d6a706b022baf6cbb /test/files
parent4afd17d6d309ba1d64979ee9078edebc5d8e035e (diff)
downloadscala-c1f8dbca52899f87128ece2f5d137fb91206ede7.tar.gz
scala-c1f8dbca52899f87128ece2f5d137fb91206ede7.tar.bz2
scala-c1f8dbca52899f87128ece2f5d137fb91206ede7.zip
Somewhere along the way AnyVal stopped working ...
Somewhere along the way AnyVal stopped working as sealed. (It was still sealed but had lost its children.) Closes #3163, review by rytz.
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/anyval-sealed.check12
-rw-r--r--test/files/neg/anyval-sealed.flags1
-rw-r--r--test/files/neg/anyval-sealed.scala6
3 files changed, 19 insertions, 0 deletions
diff --git a/test/files/neg/anyval-sealed.check b/test/files/neg/anyval-sealed.check
new file mode 100644
index 0000000000..48a457b496
--- /dev/null
+++ b/test/files/neg/anyval-sealed.check
@@ -0,0 +1,12 @@
+anyval-sealed.scala:2: error: match is not exhaustive!
+missing combination Byte
+missing combination Char
+missing combination Double
+missing combination Float
+missing combination Long
+missing combination Short
+missing combination Unit
+
+ def f(x: AnyVal) = x match {
+ ^
+one error found
diff --git a/test/files/neg/anyval-sealed.flags b/test/files/neg/anyval-sealed.flags
new file mode 100644
index 0000000000..85d8eb2ba2
--- /dev/null
+++ b/test/files/neg/anyval-sealed.flags
@@ -0,0 +1 @@
+-Xfatal-warnings
diff --git a/test/files/neg/anyval-sealed.scala b/test/files/neg/anyval-sealed.scala
new file mode 100644
index 0000000000..232a183479
--- /dev/null
+++ b/test/files/neg/anyval-sealed.scala
@@ -0,0 +1,6 @@
+class A {
+ def f(x: AnyVal) = x match {
+ case _: Boolean => 1
+ case _: Int => 2
+ }
+} \ No newline at end of file