diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-05-12 17:27:14 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2015-05-12 17:27:14 +0200 |
commit | 630bcc3e917179ff9d415513106e5b4e5065d4fb (patch) | |
tree | 6e0a59354c15ebfd499b342b62e9e0e008e5fa4d /test/files/neg | |
parent | 0bcd0a40dcfda091bbb665b5f0879d9ce3384ab5 (diff) | |
parent | 1b7e660f74223a847b307613a8ab200923433b13 (diff) | |
download | scala-630bcc3e917179ff9d415513106e5b4e5065d4fb.tar.gz scala-630bcc3e917179ff9d415513106e5b4e5065d4fb.tar.bz2 scala-630bcc3e917179ff9d415513106e5b4e5065d4fb.zip |
Merge commit '1b7e660' into merge-2.11-may-12
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/virtpatmat_exhaust_big.check | 7 | ||||
-rw-r--r-- | test/files/neg/virtpatmat_exhaust_big.flags | 1 | ||||
-rw-r--r-- | test/files/neg/virtpatmat_exhaust_big.scala | 32 |
3 files changed, 40 insertions, 0 deletions
diff --git a/test/files/neg/virtpatmat_exhaust_big.check b/test/files/neg/virtpatmat_exhaust_big.check new file mode 100644 index 0000000000..fddc85a362 --- /dev/null +++ b/test/files/neg/virtpatmat_exhaust_big.check @@ -0,0 +1,7 @@ +virtpatmat_exhaust_big.scala:27: warning: match may not be exhaustive. +It would fail on the following input: Z11() + def foo(z: Z) = z match { + ^ +error: No warnings can be incurred under -Xfatal-warnings. +one warning found +one error found diff --git a/test/files/neg/virtpatmat_exhaust_big.flags b/test/files/neg/virtpatmat_exhaust_big.flags new file mode 100644 index 0000000000..b5a8748652 --- /dev/null +++ b/test/files/neg/virtpatmat_exhaust_big.flags @@ -0,0 +1 @@ +-Xfatal-warnings -unchecked diff --git a/test/files/neg/virtpatmat_exhaust_big.scala b/test/files/neg/virtpatmat_exhaust_big.scala new file mode 100644 index 0000000000..dd639eb56e --- /dev/null +++ b/test/files/neg/virtpatmat_exhaust_big.scala @@ -0,0 +1,32 @@ +sealed abstract class Z +object Z { + object Z0 extends Z + case class Z1() extends Z + object Z2 extends Z + case class Z3() extends Z + object Z4 extends Z + case class Z5() extends Z + object Z6 extends Z + case class Z7() extends Z + object Z8 extends Z + case class Z9() extends Z + object Z10 extends Z + case class Z11() extends Z + object Z12 extends Z + case class Z13() extends Z + object Z14 extends Z + case class Z15() extends Z + object Z16 extends Z + case class Z17() extends Z + object Z18 extends Z + case class Z19() extends Z +} + +object Test { + import Z._ + def foo(z: Z) = z match { + case Z0 | Z1() | Z2 | Z3() | Z4 | Z5() | Z6 | Z7() | Z8 | Z9() | + Z10 | Z12 | Z13() | Z14 | Z15() | Z16 | Z17() | Z18 | Z19() + => + } +} |