| Index: test/dart_codegen/expect/async/stream.dart
|
| diff --git a/test/dart_codegen/expect/async/stream.dart b/test/dart_codegen/expect/async/stream.dart
|
| index 443c2592826360d3ac54ce9d7a26d298cfba9bb9..d86394dae8cc06e7ceb31489ce72b4406a4e38c9 100644
|
| --- a/test/dart_codegen/expect/async/stream.dart
|
| +++ b/test/dart_codegen/expect/async/stream.dart
|
| @@ -1,13 +1,17 @@
|
| part of dart.async;
|
| abstract class Stream<T> {Stream();
|
| factory Stream.fromFuture(Future<T> future) {
|
| - _StreamController<T> controller = new StreamController<T>(sync: true);
|
| + _StreamController<T> controller = ((__x19) => DEVC$RT.cast(__x19, DEVC$RT.type((StreamController<T> _) {
|
| + }
|
| + ), DEVC$RT.type((_StreamController<T> _) {
|
| + }
|
| + ), "CastUser", """line 88, column 9 of dart:async/stream.dart: """, __x19 is _StreamController<T>, false))(new StreamController<T>(sync: true));
|
| future.then((value) {
|
| - controller._add(DEVC$RT.cast(value, dynamic, T, "CompositeCast", """line 89, column 25 of dart:async/stream.dart: """, value is T, false));
|
| + controller._add(DEVC$RT.cast(value, dynamic, T, "CompositeCast", """line 90, column 25 of dart:async/stream.dart: """, value is T, false));
|
| controller._closeUnchecked();
|
| }
|
| , onError: (error, stackTrace) {
|
| - controller._addError(error, DEVC$RT.cast(stackTrace, dynamic, StackTrace, "DynamicCast", """line 93, column 37 of dart:async/stream.dart: """, stackTrace is StackTrace, true));
|
| + controller._addError(error, DEVC$RT.cast(stackTrace, dynamic, StackTrace, "DynamicCast", """line 94, column 37 of dart:async/stream.dart: """, stackTrace is StackTrace, true));
|
| controller._closeUnchecked();
|
| }
|
| );
|
| @@ -17,9 +21,9 @@ part of dart.async;
|
| return new _GeneratedStreamImpl<T>(() => new _IterablePendingEvents<T>(data));
|
| }
|
| factory Stream.periodic(Duration period, [T computation(int computationCount)]) {
|
| - if (computation == null) computation = ((__x23) => DEVC$RT.cast(__x23, __CastType21, DEVC$RT.type((__CastType19<T> _) {
|
| + if (computation == null) computation = ((__x24) => DEVC$RT.cast(__x24, __CastType22, DEVC$RT.type((__CastType20<T> _) {
|
| }
|
| - ), "CompositeCast", """line 126, column 44 of dart:async/stream.dart: """, __x23 is __CastType19<T>, false))(((i) => null));
|
| + ), "CompositeCast", """line 127, column 44 of dart:async/stream.dart: """, __x24 is __CastType20<T>, false))(((i) => null));
|
| Timer timer;
|
| int computationCount = 0;
|
| StreamController<T> controller;
|
| @@ -62,21 +66,21 @@ part of dart.async;
|
| return controller.stream;
|
| }
|
| factory Stream.eventTransformed(Stream source, EventSink mapSink(EventSink<T> sink)) {
|
| - return new _BoundSinkStream<dynamic, T>(source, DEVC$RT.cast(mapSink, DEVC$RT.type((__CastType24<T> _) {
|
| + return new _BoundSinkStream<dynamic, T>(source, DEVC$RT.cast(mapSink, DEVC$RT.type((__CastType25<T> _) {
|
| }
|
| ), DEVC$RT.type((_SinkMapper<dynamic, dynamic> _) {
|
| }
|
| - ), "CompositeCast", """line 216, column 41 of dart:async/stream.dart: """, mapSink is _SinkMapper<dynamic, dynamic>, false));
|
| + ), "CompositeCast", """line 217, column 41 of dart:async/stream.dart: """, mapSink is _SinkMapper<dynamic, dynamic>, false));
|
| }
|
| bool get isBroadcast => false;
|
| Stream<T> asBroadcastStream({
|
| void onListen(StreamSubscription<T> subscription), void onCancel(StreamSubscription<T> subscription)}
|
| ) {
|
| - return new _AsBroadcastStream<T>(this, DEVC$RT.cast(onListen, DEVC$RT.type((__CastType28<T> _) {
|
| + return new _AsBroadcastStream<T>(this, DEVC$RT.cast(onListen, DEVC$RT.type((__CastType29<T> _) {
|
| }
|
| - ), __CastType26, "CompositeCast", """line 248, column 44 of dart:async/stream.dart: """, onListen is __CastType26, false), DEVC$RT.cast(onCancel, DEVC$RT.type((__CastType28<T> _) {
|
| + ), __CastType27, "CompositeCast", """line 249, column 44 of dart:async/stream.dart: """, onListen is __CastType27, false), DEVC$RT.cast(onCancel, DEVC$RT.type((__CastType29<T> _) {
|
| }
|
| - ), __CastType26, "CompositeCast", """line 248, column 54 of dart:async/stream.dart: """, onCancel is __CastType26, false));
|
| + ), __CastType27, "CompositeCast", """line 249, column 54 of dart:async/stream.dart: """, onCancel is __CastType27, false));
|
| }
|
| StreamSubscription<T> listen(void onData(T event), {
|
| Function onError, void onDone(), bool cancelOnError}
|
| @@ -110,7 +114,7 @@ part of dart.async;
|
| controller.add(newValue);
|
| }
|
| }
|
| - , onError: DEVC$RT.cast(addError, dynamic, Function, "DynamicCast", """line 338, column 20 of dart:async/stream.dart: """, addError is Function, true), onDone: controller.close);
|
| + , onError: DEVC$RT.cast(addError, dynamic, Function, "DynamicCast", """line 339, column 20 of dart:async/stream.dart: """, addError is Function, true), onDone: controller.close);
|
| }
|
| if (this.isBroadcast) {
|
| controller = new StreamController.broadcast(onListen: onListen, onCancel: () {
|
| @@ -150,7 +154,7 @@ part of dart.async;
|
| controller.addStream(newStream).whenComplete(subscription.resume);
|
| }
|
| }
|
| - , onError: DEVC$RT.cast(eventSink._addError, dynamic, Function, "DynamicCast", """line 395, column 20 of dart:async/stream.dart: """, eventSink._addError is Function, true), onDone: controller.close);
|
| + , onError: DEVC$RT.cast(eventSink._addError, dynamic, Function, "DynamicCast", """line 396, column 20 of dart:async/stream.dart: """, eventSink._addError is Function, true), onDone: controller.close);
|
| }
|
| if (this.isBroadcast) {
|
| controller = new StreamController.broadcast(onListen: onListen, onCancel: () {
|
| @@ -196,7 +200,7 @@ part of dart.async;
|
| _runUserCode(() => combine(value, element), (T newValue) {
|
| value = newValue;
|
| }
|
| - , ((__x33) => DEVC$RT.cast(__x33, dynamic, __CastType30, "CompositeCast", """line 501, column 24 of dart:async/stream.dart: """, __x33 is __CastType30, false))(_cancelAndErrorClosure(subscription, result)));
|
| + , ((__x34) => DEVC$RT.cast(__x34, dynamic, __CastType31, "CompositeCast", """line 502, column 24 of dart:async/stream.dart: """, __x34 is __CastType31, false))(_cancelAndErrorClosure(subscription, result)));
|
| }
|
| else {
|
| value = element;
|
| @@ -227,10 +231,10 @@ part of dart.async;
|
| _runUserCode(() => combine(value, element), (newValue) {
|
| value = newValue;
|
| }
|
| - , ((__x34) => DEVC$RT.cast(__x34, dynamic, __CastType30, "CompositeCast", """line 534, column 11 of dart:async/stream.dart: """, __x34 is __CastType30, false))(_cancelAndErrorClosure(subscription, result)));
|
| + , ((__x35) => DEVC$RT.cast(__x35, dynamic, __CastType31, "CompositeCast", """line 535, column 11 of dart:async/stream.dart: """, __x35 is __CastType31, false))(_cancelAndErrorClosure(subscription, result)));
|
| }
|
| , onError: (e, st) {
|
| - result._completeError(e, DEVC$RT.cast(st, dynamic, StackTrace, "DynamicCast", """line 538, column 34 of dart:async/stream.dart: """, st is StackTrace, true));
|
| + result._completeError(e, DEVC$RT.cast(st, dynamic, StackTrace, "DynamicCast", """line 539, column 34 of dart:async/stream.dart: """, st is StackTrace, true));
|
| }
|
| , onDone: () {
|
| result._complete(value);
|
| @@ -273,7 +277,7 @@ part of dart.async;
|
| _cancelAndValue(subscription, future, true);
|
| }
|
| }
|
| - , ((__x35) => DEVC$RT.cast(__x35, dynamic, __CastType30, "CompositeCast", """line 602, column 13 of dart:async/stream.dart: """, __x35 is __CastType30, false))(_cancelAndErrorClosure(subscription, future)));
|
| + , ((__x36) => DEVC$RT.cast(__x36, dynamic, __CastType31, "CompositeCast", """line 603, column 13 of dart:async/stream.dart: """, __x36 is __CastType31, false))(_cancelAndErrorClosure(subscription, future)));
|
| }
|
| , onError: future._completeError, onDone: () {
|
| future._complete(false);
|
| @@ -287,7 +291,7 @@ part of dart.async;
|
| subscription = this.listen((T element) {
|
| _runUserCode(() => action(element), (_) {
|
| }
|
| - , ((__x36) => DEVC$RT.cast(__x36, dynamic, __CastType30, "CompositeCast", """line 628, column 13 of dart:async/stream.dart: """, __x36 is __CastType30, false))(_cancelAndErrorClosure(subscription, future)));
|
| + , ((__x37) => DEVC$RT.cast(__x37, dynamic, __CastType31, "CompositeCast", """line 629, column 13 of dart:async/stream.dart: """, __x37 is __CastType31, false))(_cancelAndErrorClosure(subscription, future)));
|
| }
|
| , onError: future._completeError, onDone: () {
|
| future._complete(null);
|
| @@ -304,7 +308,7 @@ part of dart.async;
|
| _cancelAndValue(subscription, future, false);
|
| }
|
| }
|
| - , ((__x37) => DEVC$RT.cast(__x37, dynamic, __CastType30, "CompositeCast", """line 657, column 13 of dart:async/stream.dart: """, __x37 is __CastType30, false))(_cancelAndErrorClosure(subscription, future)));
|
| + , ((__x38) => DEVC$RT.cast(__x38, dynamic, __CastType31, "CompositeCast", """line 658, column 13 of dart:async/stream.dart: """, __x38 is __CastType31, false))(_cancelAndErrorClosure(subscription, future)));
|
| }
|
| , onError: future._completeError, onDone: () {
|
| future._complete(true);
|
| @@ -321,7 +325,7 @@ part of dart.async;
|
| _cancelAndValue(subscription, future, true);
|
| }
|
| }
|
| - , ((__x38) => DEVC$RT.cast(__x38, dynamic, __CastType30, "CompositeCast", """line 694, column 13 of dart:async/stream.dart: """, __x38 is __CastType30, false))(_cancelAndErrorClosure(subscription, future)));
|
| + , ((__x39) => DEVC$RT.cast(__x39, dynamic, __CastType31, "CompositeCast", """line 695, column 13 of dart:async/stream.dart: """, __x39 is __CastType31, false))(_cancelAndErrorClosure(subscription, future)));
|
| }
|
| , onError: future._completeError, onDone: () {
|
| future._complete(false);
|
| @@ -475,7 +479,7 @@ part of dart.async;
|
| _cancelAndValue(subscription, future, value);
|
| }
|
| }
|
| - , ((__x39) => DEVC$RT.cast(__x39, dynamic, __CastType30, "CompositeCast", """line 1036, column 11 of dart:async/stream.dart: """, __x39 is __CastType30, false))(_cancelAndErrorClosure(subscription, future)));
|
| + , ((__x40) => DEVC$RT.cast(__x40, dynamic, __CastType31, "CompositeCast", """line 1037, column 11 of dart:async/stream.dart: """, __x40 is __CastType31, false))(_cancelAndErrorClosure(subscription, future)));
|
| }
|
| , onError: future._completeError, onDone: () {
|
| if (defaultValue != null) {
|
| @@ -505,7 +509,7 @@ part of dart.async;
|
| result = value;
|
| }
|
| }
|
| - , ((__x40) => DEVC$RT.cast(__x40, dynamic, __CastType30, "CompositeCast", """line 1077, column 11 of dart:async/stream.dart: """, __x40 is __CastType30, false))(_cancelAndErrorClosure(subscription, future)));
|
| + , ((__x41) => DEVC$RT.cast(__x41, dynamic, __CastType31, "CompositeCast", """line 1078, column 11 of dart:async/stream.dart: """, __x41 is __CastType31, false))(_cancelAndErrorClosure(subscription, future)));
|
| }
|
| , onError: future._completeError, onDone: () {
|
| if (foundResult) {
|
| @@ -544,7 +548,7 @@ part of dart.async;
|
| result = value;
|
| }
|
| }
|
| - , ((__x41) => DEVC$RT.cast(__x41, dynamic, __CastType30, "CompositeCast", """line 1129, column 11 of dart:async/stream.dart: """, __x41 is __CastType30, false))(_cancelAndErrorClosure(subscription, future)));
|
| + , ((__x42) => DEVC$RT.cast(__x42, dynamic, __CastType31, "CompositeCast", """line 1130, column 11 of dart:async/stream.dart: """, __x42 is __CastType31, false))(_cancelAndErrorClosure(subscription, future)));
|
| }
|
| , onError: future._completeError, onDone: () {
|
| if (foundResult) {
|
| @@ -588,13 +592,13 @@ part of dart.async;
|
| void onData(T event) {
|
| timer.cancel();
|
| controller.add(event);
|
| - timer = zone.createTimer(timeLimit, DEVC$RT.cast(timeout, Function, __CastType42, "CompositeCast", """line 1219, column 43 of dart:async/stream.dart: """, timeout is __CastType42, false));
|
| + timer = zone.createTimer(timeLimit, DEVC$RT.cast(timeout, Function, __CastType43, "CompositeCast", """line 1220, column 43 of dart:async/stream.dart: """, timeout is __CastType43, false));
|
| }
|
| void onError(error, StackTrace stackTrace) {
|
| timer.cancel();
|
| assert (controller is _StreamController || controller is _BroadcastStreamController); var eventSink = controller;
|
| eventSink._addError(error, stackTrace);
|
| - timer = zone.createTimer(timeLimit, DEVC$RT.cast(timeout, Function, __CastType42, "CompositeCast", """line 1227, column 43 of dart:async/stream.dart: """, timeout is __CastType42, false));
|
| + timer = zone.createTimer(timeLimit, DEVC$RT.cast(timeout, Function, __CastType43, "CompositeCast", """line 1228, column 43 of dart:async/stream.dart: """, timeout is __CastType43, false));
|
| }
|
| void onDone() {
|
| timer.cancel();
|
| @@ -609,7 +613,7 @@ part of dart.async;
|
| ;
|
| }
|
| else {
|
| - onTimeout = ((__x45) => DEVC$RT.cast(__x45, ZoneUnaryCallback, __CastType43, "CompositeCast", """line 1245, column 21 of dart:async/stream.dart: """, __x45 is __CastType43, false))(zone.registerUnaryCallback(onTimeout));
|
| + onTimeout = ((__x46) => DEVC$RT.cast(__x46, ZoneUnaryCallback, __CastType44, "CompositeCast", """line 1246, column 21 of dart:async/stream.dart: """, __x46 is __CastType44, false))(zone.registerUnaryCallback(onTimeout));
|
| _ControllerEventSinkWrapper wrapper = new _ControllerEventSinkWrapper(null);
|
| timeout = () {
|
| wrapper._sink = controller;
|
| @@ -619,7 +623,7 @@ part of dart.async;
|
| ;
|
| }
|
| subscription = this.listen(onData, onError: onError, onDone: onDone);
|
| - timer = zone.createTimer(timeLimit, DEVC$RT.cast(timeout, Function, __CastType42, "CompositeCast", """line 1256, column 43 of dart:async/stream.dart: """, timeout is __CastType42, false));
|
| + timer = zone.createTimer(timeLimit, DEVC$RT.cast(timeout, Function, __CastType43, "CompositeCast", """line 1257, column 43 of dart:async/stream.dart: """, timeout is __CastType43, false));
|
| }
|
| Future onCancel() {
|
| timer.cancel();
|
| @@ -633,7 +637,7 @@ part of dart.async;
|
| }
|
| , () {
|
| subscription.resume();
|
| - timer = zone.createTimer(timeLimit, DEVC$RT.cast(timeout, Function, __CastType42, "CompositeCast", """line 1275, column 53 of dart:async/stream.dart: """, timeout is __CastType42, false));
|
| + timer = zone.createTimer(timeLimit, DEVC$RT.cast(timeout, Function, __CastType43, "CompositeCast", """line 1276, column 53 of dart:async/stream.dart: """, timeout is __CastType43, false));
|
| }
|
| , onCancel);
|
| return controller.stream;
|
| @@ -656,7 +660,7 @@ part of dart.async;
|
| StreamView(this._stream);
|
| bool get isBroadcast => _stream.isBroadcast;
|
| Stream<T> asBroadcastStream({
|
| -void onListen(StreamSubscription subscription), void onCancel(StreamSubscription subscription)}
|
| +void onListen(StreamSubscription<T> subscription), void onCancel(StreamSubscription<T> subscription)}
|
| ) => _stream.asBroadcastStream(onListen: onListen, onCancel: onCancel);
|
| StreamSubscription<T> listen(void onData(T value), {
|
| Function onError, void onDone(), bool cancelOnError}
|
| @@ -693,11 +697,11 @@ _sink.addError(error, stackTrace);
|
| _sink.close();
|
| }
|
| }
|
| - typedef T __CastType19<T>(int __u20);
|
| - typedef dynamic __CastType21(dynamic __u22);
|
| - typedef EventSink<dynamic> __CastType24<T>(EventSink<T> __u25);
|
| - typedef void __CastType26(StreamSubscription<dynamic> __u27);
|
| - typedef void __CastType28<T>(StreamSubscription<T> __u29);
|
| - typedef dynamic __CastType30(dynamic __u31, StackTrace __u32);
|
| - typedef void __CastType42();
|
| - typedef void __CastType43(EventSink<dynamic> __u44);
|
| + typedef T __CastType20<T>(int __u21);
|
| + typedef dynamic __CastType22(dynamic __u23);
|
| + typedef EventSink<dynamic> __CastType25<T>(EventSink<T> __u26);
|
| + typedef void __CastType27(StreamSubscription<dynamic> __u28);
|
| + typedef void __CastType29<T>(StreamSubscription<T> __u30);
|
| + typedef dynamic __CastType31(dynamic __u32, StackTrace __u33);
|
| + typedef void __CastType43();
|
| + typedef void __CastType44(EventSink<dynamic> __u45);
|
|
|