aboutsummaryrefslogtreecommitdiff
path: root/tests/run/enum-Color.scala
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2017-04-10 10:33:32 +0200
committerGitHub <noreply@github.com>2017-04-10 10:33:32 +0200
commit318700fdaacd7e6707519e03f15a5ede99ca558a (patch)
tree809f66b68f9200afd8daef9172921405469a39c7 /tests/run/enum-Color.scala
parent80f9b6da66cb4eeabfd5ab97e422752ff134d590 (diff)
parent2bf1e1913feb36d90d1c4e857c6cd9610d80ff61 (diff)
downloaddotty-318700fdaacd7e6707519e03f15a5ede99ca558a.tar.gz
dotty-318700fdaacd7e6707519e03f15a5ede99ca558a.tar.bz2
dotty-318700fdaacd7e6707519e03f15a5ede99ca558a.zip
Merge pull request #2197 from dotty-staging/add-enum-exhaustiveness
Add enum exhaustivity checking
Diffstat (limited to 'tests/run/enum-Color.scala')
-rw-r--r--tests/run/enum-Color.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/run/enum-Color.scala b/tests/run/enum-Color.scala
index 683d18d9e..f4f6aaef8 100644
--- a/tests/run/enum-Color.scala
+++ b/tests/run/enum-Color.scala
@@ -7,5 +7,9 @@ object Test {
for (color <- Color.enumValues) {
println(s"$color: ${color.enumTag}")
assert(Color.enumValue(color.enumTag) eq color)
+ import Color._
+ color match {
+ case Red | Green | Blue =>
+ }
}
}