File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
tests/pos-special/stdlib/collection Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import scala.annotation.tailrec
1717import scala .annotation .unchecked .{uncheckedVariance , uncheckedCaptures }
1818import scala .runtime .Statics
1919import language .experimental .captureChecking
20- import caps .unsafe .unsafeAssumePure
2120import annotation .unchecked .uncheckedCaptures
2221
2322
@@ -1146,9 +1145,7 @@ object Iterator extends IterableFactory[Iterator] {
11461145 * Nested ConcatIterators are merged to avoid blowing the stack.
11471146 */
11481147 private final class ConcatIterator [+ A ](val from : Iterator [A ]^ ) extends AbstractIterator [A ] {
1149- private var current : Iterator [A @ uncheckedCaptures] = from.unsafeAssumePure
1150- // This should be Iteratpr[A]^, but fails since mutable variables can't capture cap.
1151- // To do better we'd need to track nesting levels for universal capabiltities.
1148+ private var current : Iterator [A @ uncheckedCaptures]^ {cap[ConcatIterator ]} = from
11521149 private var tail : ConcatIteratorCell [A @ uncheckedVariance @ uncheckedCaptures] = null
11531150 private var last : ConcatIteratorCell [A @ uncheckedVariance @ uncheckedCaptures] = null
11541151 private var currentHasNextChecked = false
You can’t perform that action at this time.
0 commit comments