diff options
author | liu fengyun <liu@fengy.me> | 2017-04-06 15:36:37 +0200 |
---|---|---|
committer | liu fengyun <liu@fengy.me> | 2017-04-06 15:38:04 +0200 |
commit | 0c4a06f8409feac5ba99c0a8961210225dbd4936 (patch) | |
tree | 9fb1b7e5d0bb52baaf9b771e5f1e4071dc47e708 /tests/patmat/enumColor.scala | |
parent | 52521ea6070d907f77ceab0692f804f52c29ffca (diff) | |
download | dotty-0c4a06f8409feac5ba99c0a8961210225dbd4936.tar.gz dotty-0c4a06f8409feac5ba99c0a8961210225dbd4936.tar.bz2 dotty-0c4a06f8409feac5ba99c0a8961210225dbd4936.zip |
exhaustivity support for enums
Diffstat (limited to 'tests/patmat/enumColor.scala')
-rw-r--r-- | tests/patmat/enumColor.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/patmat/enumColor.scala b/tests/patmat/enumColor.scala new file mode 100644 index 000000000..60d610d0d --- /dev/null +++ b/tests/patmat/enumColor.scala @@ -0,0 +1,12 @@ + enum Color { + case Red, Green, Blue + } + + object Test { + def f(color: Color) = { + import Color._ + color match { + case Red | Green | Blue => + } + } +} |