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
17
17
import scala .annotation .unchecked .{uncheckedVariance , uncheckedCaptures }
18
18
import scala .runtime .Statics
19
19
import language .experimental .captureChecking
20
- import caps .unsafe .unsafeAssumePure
21
20
import annotation .unchecked .uncheckedCaptures
22
21
23
22
@@ -1146,9 +1145,7 @@ object Iterator extends IterableFactory[Iterator] {
1146
1145
* Nested ConcatIterators are merged to avoid blowing the stack.
1147
1146
*/
1148
1147
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
1152
1149
private var tail : ConcatIteratorCell [A @ uncheckedVariance @ uncheckedCaptures] = null
1153
1150
private var last : ConcatIteratorCell [A @ uncheckedVariance @ uncheckedCaptures] = null
1154
1151
private var currentHasNextChecked = false
You can’t perform that action at this time.
0 commit comments