diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/patternalts.check | 4 | ||||
-rw-r--r-- | test/files/neg/patternalts.scala | 8 | ||||
-rw-r--r-- | test/files/run/colltest.check | 2 | ||||
-rw-r--r-- | test/files/run/colltest.scala | 2 |
4 files changed, 14 insertions, 2 deletions
diff --git a/test/files/neg/patternalts.check b/test/files/neg/patternalts.check new file mode 100644 index 0000000000..9bec9a001a --- /dev/null +++ b/test/files/neg/patternalts.check @@ -0,0 +1,4 @@ +patternalts.scala:3: error: illegal variable in pattern alternative + case List(x) | List() => Console.println(x) + ^ +one error found diff --git a/test/files/neg/patternalts.scala b/test/files/neg/patternalts.scala new file mode 100644 index 0000000000..091b6e51ad --- /dev/null +++ b/test/files/neg/patternalts.scala @@ -0,0 +1,8 @@ +object Test { + List(1) match { + case List(x) | List() => Console.println(x) + } + List(2) match { + case List(_: int) | List() => Console.println() + } +} diff --git a/test/files/run/colltest.check b/test/files/run/colltest.check index 868cc81ece..be930f06ce 100644 --- a/test/files/run/colltest.check +++ b/test/files/run/colltest.check @@ -1 +1 @@ -succeeded for 1000000 iterations. +succeeded for 10 iterations. diff --git a/test/files/run/colltest.scala b/test/files/run/colltest.scala index 024f2fb1f4..049c075fa1 100644 --- a/test/files/run/colltest.scala +++ b/test/files/run/colltest.scala @@ -1,6 +1,6 @@ import collection.mutable._ class TestSet(s0: Set[int], s1: Set[int]) { - val Iterations = 1000000 + val Iterations = 10 val Range = 100000 val testEachStep = false val Threshold = 20000 |