Skip to content

Commit d140083

Browse files
committed
Update test
1 parent 484e97a commit d140083

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

scala2-library-cc/src/scala/collection/View.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,9 @@ object View extends IterableFactory[View] {
156156
new Filter(filter.underlying, a => filter.p(a) && p(a), isFlipped)
157157
.asInstanceOf[Filter[A]^{underlying, p}]
158158
// !!! asInstanceOf needed once paths were added, see path-patmat-should-be-pos.scala for minimization
159-
//case filter: Filter[A]^{underlying} if filter.isFlipped == isFlipped =>
160-
// unsafeAssumeSeparate:
161159
// See filter-iterable.scala for a test where a variant of Filter
162160
// works without the unsafeAssumeSeparate. But it requires significant
163161
// changes compared to the version here. See also Filter in colltest5.CollectionStrawManCC5_1.
164-
// new Filter(filter.underlying, a => filter.p(a) && p(a), isFlipped)
165162
case _ => new Filter(underlying, p, isFlipped)
166163
}
167164
}

tests/neg-custom-args/captures/match.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ def test =
1212
case b: B => b // error: (b: B) becomes B^{x} implicitly
1313

1414
val y2: A^{x} = a match
15-
case b: B => b // ok
15+
case b: B =>
16+
val bb: B^{b} = b
17+
val aa: A^{a} = bb
18+
b // ok
1619

1720
val x3: AnyRef = a match
1821
case B(x2: AnyRef) => x2 // error: we lose some information about field x, but it still cannot be pure

tests/run-custom-args/captures/colltest5/CollectionStrawManCC5_1.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,13 +457,12 @@ object CollectionStrawMan5 {
457457
def apply[A](underlying: Iterable[A]^, pp: A => Boolean, isFlipped: Boolean): Filter[A]^{underlying, pp} =
458458
underlying match
459459
case filter: Filter[A] =>
460-
new Filter(filter.underlying, a => filter.p(a) && pp(a))
461-
.asInstanceOf[Filter[A]^{underlying, pp}]
462-
//unsafeAssumeSeparate:
460+
unsafeAssumeSeparate:
461+
new Filter(filter.underlying, a => filter.p(a) && pp(a))
462+
.asInstanceOf[Filter[A]^{underlying, pp}]
463463
// See filter-iterable.scala for a test where a variant of Filter
464464
// works without the unsafeAssumeSeparate. But it requires significant
465465
// changes compared to the version here.
466-
//new Filter(filter.underlying, a => filter.p(a) && pp(a))
467466
case _ => new Filter(underlying, pp)
468467

469468
case class Partition[A](val underlying: Iterable[A]^, p: A => Boolean) {

0 commit comments

Comments
 (0)