diff options
author | Martin Odersky <odersky@gmail.com> | 2017-02-08 21:23:47 +1100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-04 13:28:44 +0200 |
commit | c2790577d64b039792618c92e6ab7cff7a7ed824 (patch) | |
tree | 9b9c28e583b74ca010b193c9e5aaa529e1bdead9 /tests/neg | |
parent | cea243a4fc38dcc8831000d1066e10362df37576 (diff) | |
download | dotty-c2790577d64b039792618c92e6ab7cff7a7ed824.tar.gz dotty-c2790577d64b039792618c92e6ab7cff7a7ed824.tar.bz2 dotty-c2790577d64b039792618c92e6ab7cff7a7ed824.zip |
Add tests
Diffstat (limited to 'tests/neg')
-rw-r--r-- | tests/neg/enums.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/neg/enums.scala b/tests/neg/enums.scala new file mode 100644 index 000000000..83311f37c --- /dev/null +++ b/tests/neg/enums.scala @@ -0,0 +1,8 @@ +enum List[+T] { + case Cons(x: T, xs: List[T]) + case Nil // error: illegal enum value +} + +enum class X { + case Y // error: case not allowed here +} |