| Index: sdk/lib/async/stream.dart
|
| diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
|
| index 0eaa6e229924ba4cf3f86b4cab1f175682831ce0..244c140dd86e9c871043ff89df1763e6bb576c99 100644
|
| --- a/sdk/lib/async/stream.dart
|
| +++ b/sdk/lib/async/stream.dart
|
| @@ -277,9 +277,7 @@ abstract class Stream<T> {
|
| T value;
|
| StreamSubscription subscription;
|
| subscription = this.listen(
|
| - // TODO(ahe): Restore type when feature is implemented in dart2js
|
| - // checked mode. http://dartbug.com/7733
|
| - (/* T */ element) {
|
| + (T element) {
|
| if (seenFirst) {
|
| _runUserCode(() => combine(value, element),
|
| (T newValue) { value = newValue; },
|
| @@ -308,9 +306,7 @@ abstract class Stream<T> {
|
| var value = initialValue;
|
| StreamSubscription subscription;
|
| subscription = this.listen(
|
| - // TODO(ahe): Restore type when feature is implemented in dart2js
|
| - // checked mode. http://dartbug.com/7733
|
| - (/*T*/ element) {
|
| + (T element) {
|
| _runUserCode(
|
| () => combine(value, element),
|
| (newValue) { value = newValue; },
|
| @@ -337,9 +333,7 @@ abstract class Stream<T> {
|
| _FutureImpl<bool> future = new _FutureImpl<bool>();
|
| StreamSubscription subscription;
|
| subscription = this.listen(
|
| - // TODO(ahe): Restore type when feature is implemented in dart2js
|
| - // checked mode. http://dartbug.com/7733
|
| - (/*T*/ element) {
|
| + (T element) {
|
| _runUserCode(
|
| () => (element == needle),
|
| (bool isMatch) {
|
| @@ -370,9 +364,7 @@ abstract class Stream<T> {
|
| _FutureImpl future = new _FutureImpl();
|
| StreamSubscription subscription;
|
| subscription = this.listen(
|
| - // TODO(ahe): Restore type when feature is implemented in dart2js
|
| - // checked mode. http://dartbug.com/7733
|
| - (/*T*/ element) {
|
| + (T element) {
|
| _runUserCode(
|
| () => action(element),
|
| (_) {},
|
| @@ -397,9 +389,7 @@ abstract class Stream<T> {
|
| _FutureImpl<bool> future = new _FutureImpl<bool>();
|
| StreamSubscription subscription;
|
| subscription = this.listen(
|
| - // TODO(ahe): Restore type when feature is implemented in dart2js
|
| - // checked mode. http://dartbug.com/7733
|
| - (/*T*/ element) {
|
| + (T element) {
|
| _runUserCode(
|
| () => test(element),
|
| (bool isMatch) {
|
| @@ -429,9 +419,7 @@ abstract class Stream<T> {
|
| _FutureImpl<bool> future = new _FutureImpl<bool>();
|
| StreamSubscription subscription;
|
| subscription = this.listen(
|
| - // TODO(ahe): Restore type when feature is implemented in dart2js
|
| - // checked mode. http://dartbug.com/7733
|
| - (/*T*/ element) {
|
| + (T element) {
|
| _runUserCode(
|
| () => test(element),
|
| (bool isMatch) {
|
| @@ -488,9 +476,7 @@ abstract class Stream<T> {
|
| List<T> result = <T>[];
|
| _FutureImpl<List<T>> future = new _FutureImpl<List<T>>();
|
| this.listen(
|
| - // TODO(ahe): Restore type when feature is implemented in dart2js
|
| - // checked mode. http://dartbug.com/7733
|
| - (/*T*/ data) {
|
| + (T data) {
|
| result.add(data);
|
| },
|
| onError: future._setError,
|
| @@ -506,9 +492,7 @@ abstract class Stream<T> {
|
| Set<T> result = new Set<T>();
|
| _FutureImpl<Set<T>> future = new _FutureImpl<Set<T>>();
|
| this.listen(
|
| - // TODO(ahe): Restore type when feature is implemented in dart2js
|
| - // checked mode. http://dartbug.com/7733
|
| - (/*T*/ data) {
|
| + (T data) {
|
| result.add(data);
|
| },
|
| onError: future._setError,
|
| @@ -600,9 +584,7 @@ abstract class Stream<T> {
|
| _FutureImpl<T> future = new _FutureImpl<T>();
|
| StreamSubscription subscription;
|
| subscription = this.listen(
|
| - // TODO(ahe): Restore type when feature is implemented in dart2js
|
| - // checked mode. http://dartbug.com/7733
|
| - (/*T*/ value) {
|
| + (T value) {
|
| subscription.cancel();
|
| future._setValue(value);
|
| return;
|
| @@ -626,9 +608,7 @@ abstract class Stream<T> {
|
| bool foundResult = false;
|
| StreamSubscription subscription;
|
| subscription = this.listen(
|
| - // TODO(ahe): Restore type when feature is implemented in dart2js
|
| - // checked mode. http://dartbug.com/7733
|
| - (/*T*/ value) {
|
| + (T value) {
|
| foundResult = true;
|
| result = value;
|
| },
|
| @@ -655,9 +635,7 @@ abstract class Stream<T> {
|
| bool foundResult = false;
|
| StreamSubscription subscription;
|
| subscription = this.listen(
|
| - // TODO(ahe): Restore type when feature is implemented in dart2js
|
| - // checked mode. http://dartbug.com/7733
|
| - (/*T*/ value) {
|
| + (T value) {
|
| if (foundResult) {
|
| subscription.cancel();
|
| // This is the second element we get.
|
| @@ -698,9 +676,7 @@ abstract class Stream<T> {
|
| _FutureImpl<dynamic> future = new _FutureImpl();
|
| StreamSubscription subscription;
|
| subscription = this.listen(
|
| - // TODO(ahe): Restore type when feature is implemented in dart2js
|
| - // checked mode. http://dartbug.com/7733
|
| - (/*T*/ value) {
|
| + (T value) {
|
| _runUserCode(
|
| () => test(value),
|
| (bool isMatch) {
|
| @@ -737,9 +713,7 @@ abstract class Stream<T> {
|
| bool foundResult = false;
|
| StreamSubscription subscription;
|
| subscription = this.listen(
|
| - // TODO(ahe): Restore type when feature is implemented in dart2js
|
| - // checked mode. http://dartbug.com/7733
|
| - (/*T*/ value) {
|
| + (T value) {
|
| _runUserCode(
|
| () => true == test(value),
|
| (bool isMatch) {
|
| @@ -779,9 +753,7 @@ abstract class Stream<T> {
|
| bool foundResult = false;
|
| StreamSubscription subscription;
|
| subscription = this.listen(
|
| - // TODO(ahe): Restore type when feature is implemented in dart2js
|
| - // checked mode. http://dartbug.com/7733
|
| - (/*T*/ value) {
|
| + (T value) {
|
| _runUserCode(
|
| () => true == test(value),
|
| (bool isMatch) {
|
| @@ -824,9 +796,7 @@ abstract class Stream<T> {
|
| _FutureImpl<T> future = new _FutureImpl<T>();
|
| StreamSubscription subscription;
|
| subscription = this.listen(
|
| - // TODO(ahe): Restore type when feature is implemented in dart2js
|
| - // checked mode. http://dartbug.com/7733
|
| - (/*T*/ value) {
|
| + (T value) {
|
| if (index == 0) {
|
| subscription.cancel();
|
| future._setValue(value);
|
|
|