diff options
author | odersky <odersky@gmail.com> | 2017-04-10 10:33:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-10 10:33:32 +0200 |
commit | 318700fdaacd7e6707519e03f15a5ede99ca558a (patch) | |
tree | 809f66b68f9200afd8daef9172921405469a39c7 /tests/run | |
parent | 80f9b6da66cb4eeabfd5ab97e422752ff134d590 (diff) | |
parent | 2bf1e1913feb36d90d1c4e857c6cd9610d80ff61 (diff) | |
download | dotty-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')
-rw-r--r-- | tests/run/enum-Color.scala | 4 |
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 => + } } } |