summaryrefslogtreecommitdiff
path: root/test/files/neg/t7020.scala
Commit message (Collapse)AuthorAgeFilesLines
* SI-7020 Deterministic warnings for pattern matcher, take 2Jason Zaugg2013-10-221-0/+30
| | | | | | | | | | | | | | | | | | | The previous swing at determinism, ebb01e05cbe4, made decent contact but apparently didn't hit it out of the park. The test wavered every hundred or so runs, as witnessed occasionally in nightly builds or pull request validation. I setup a test to run neg/7020.scala a few hundred times, and could trigger the failure reliably. I then swept through the pattern matcher in search of HashMap and HashSet creation, and changed them all to the Linked variety. The results of that are published in retronym#ticket/7020-3 [1]. This commit represents the careful whittling down of that patch to the minimal change required to exhibit determinism. [1] https://github.com/retronym/scala/compare/ticket/7020-3
* Disable tests for SI-7020Jason Zaugg2013-10-171-30/+0
| | | | | | | | | | | | | | | | | | These are still impudently being non-deterministic. I've reopened the ticket so we can take another swing at it. A well targetted s/HashMap/LinkedHashMap/ will almost certainly be the salve. fail - neg/t7020.scala [output differs]% scalac t7020.scala t7020.scala:3: warning: match may not be exhaustive. It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 5, 6, 7))), List((x: Int forSome x not in (1, 2, 4, 5, 6, 7)), _), List(1, _), List(2, _), List(4, _), List(5, _), List(6, _), List(7, _), List(??, _), List(_, _) List(5) match { ^ t7020.scala:10: warning: match may not be exhaustive. It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 5, 6, 7))), List((x: Int forSome x not in (1, 2, 4, 5, 6, 7)), _), List(1, _), List(2, _), List(4, _), List(5, _), List(6, _), List(7, _), List(??, _), List(_, _) List(5) match { ^
* SI-7020 Determinism for pattern matcher warningsJason Zaugg2013-08-131-0/+30
Use LinkedHashSet for the DPLL algorithm for determistic counter example generation. Before, the test compiled with: [info] v2.10.2 => /Users/jason/usr/scala-v2.10.2-0-g60d462e test/files/neg/t7020.scala:3: warning: match may not be exhaustive. It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 5, 6, 7))), List(_, _) List(5) match { ^ test/files/neg/t7020.scala:10: warning: match may not be exhaustive. It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 5, 6, 7))), List(_, _) List(5) match { ^ test/files/neg/t7020.scala:17: warning: match may not be exhaustive. It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 6, 7)), _), List(1, _), List(2, _), List(4, _), List(5, _), List(6, _), List(7, _), List(??, _) List(5) match { ^ test/files/neg/t7020.scala:24: warning: match may not be exhaustive. It would fail on the following input: List(_, _) List(5) match { ^