From a87d40960bfdb4a683c05d3430a8874cb4dcff36 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Sun, 13 Jan 2013 17:42:48 +0100 Subject: SI-6968 Simple Tuple patterns aren't irrefutable Reverts part of c82ecab. The parser can't assume that a pattern `(a, b)` will match, as results of `.isInstanceOf[Tuple2]` can't be statically known until after the typer. The reopens SI-1336, SI-5589 and SI-4574, in exchange for fixing this regression SI-6968. Keeping all of those fixed will require a better definition of irrefutability, and some acrobatics to ensure safe passage to the ambiguous trees through typechecking. --- test/files/scalacheck/parallel-collections/ParallelMapCheck1.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/files/scalacheck') diff --git a/test/files/scalacheck/parallel-collections/ParallelMapCheck1.scala b/test/files/scalacheck/parallel-collections/ParallelMapCheck1.scala index 05237bace8..b6af8f41bd 100644 --- a/test/files/scalacheck/parallel-collections/ParallelMapCheck1.scala +++ b/test/files/scalacheck/parallel-collections/ParallelMapCheck1.scala @@ -20,7 +20,7 @@ abstract class ParallelMapCheck[K, V](collname: String) extends ParallelIterable property("gets iterated keys") = forAll(collectionPairs) { case (t, coll) => val containsT = for ((k, v) <- t) yield (coll.get(k) == Some(v)) - val containsSelf = for ((k, v) <- coll) yield (coll.get(k) == Some(v)) + val containsSelf = coll.map { case (k, v) => coll.get(k) == Some(v) } ("Par contains elements of seq map" |: containsT.forall(_ == true)) && ("Par contains elements of itself" |: containsSelf.forall(_ == true)) } -- cgit v1.2.3