Index: sdk/lib/async/stream_impl.dart |
diff --git a/sdk/lib/async/stream_impl.dart b/sdk/lib/async/stream_impl.dart |
index 92fd7a957f7434e5752a3e9dc96fbf832f5c27e5..3f77294619a6e3d3b1e23f7794fc6b51e8700e95 100644 |
--- a/sdk/lib/async/stream_impl.dart |
+++ b/sdk/lib/async/stream_impl.dart |
@@ -998,25 +998,24 @@ class _StreamIteratorImpl<T> implements StreamIterator<T> { |
_current = null; |
_futureOrPrefetch = new _Future<bool>(); |
return _futureOrPrefetch; |
- } |
- assert(_state >= _STATE_EXTRA_DATA); |
- switch (_state) { |
- case _STATE_EXTRA_DATA: |
- _state = _STATE_FOUND; |
- _current = _futureOrPrefetch; |
- _futureOrPrefetch = null; |
- _subscription.resume(); |
- return new _Future<bool>.immediate(true); |
- case _STATE_EXTRA_ERROR: |
- AsyncError prefetch = _futureOrPrefetch; |
- _clear(); |
- return new _Future<bool>.immediateError(prefetch.error, |
- prefetch.stackTrace); |
- case _STATE_EXTRA_DONE: |
- _clear(); |
- return new _Future<bool>.immediate(false); |
- default: |
- throw "Unreachable"; |
+ } else { |
+ assert(_state >= _STATE_EXTRA_DATA); |
+ switch (_state) { |
+ case _STATE_EXTRA_DATA: |
+ _state = _STATE_FOUND; |
+ _current = _futureOrPrefetch; |
+ _futureOrPrefetch = null; |
+ _subscription.resume(); |
+ return new _Future<bool>.immediate(true); |
+ case _STATE_EXTRA_ERROR: |
+ AsyncError prefetch = _futureOrPrefetch; |
+ _clear(); |
+ return new _Future<bool>.immediateError(prefetch.error, |
+ prefetch.stackTrace); |
+ case _STATE_EXTRA_DONE: |
+ _clear(); |
+ return new _Future<bool>.immediate(false); |
+ } |
} |
} |