Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: test/dart_codegen/expect/async/stream_controller.dart

Issue 959003003: Typecheck constructor initializers properly (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/dart_codegen/expect/async/stream.dart ('k') | test/dart_codegen/expect/async/stream_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/dart_codegen/expect/async/stream_controller.dart
diff --git a/test/dart_codegen/expect/async/stream_controller.dart b/test/dart_codegen/expect/async/stream_controller.dart
index 053c93b1218adafa4fe7647bbf5ea1a42d625b97..9f517176bc660a4cbf52882f6da8d44db9a9fcb3 100644
--- a/test/dart_codegen/expect/async/stream_controller.dart
+++ b/test/dart_codegen/expect/async/stream_controller.dart
@@ -4,11 +4,11 @@ part of dart.async;
void onListen(), void onPause(), void onResume(), onCancel(), bool sync : false}
) {
if (onListen == null && onPause == null && onResume == null && onCancel == null) {
- return ((__x90) => DDC$RT.cast(__x90, DDC$RT.type((_StreamController<dynamic> _) {
+ return ((__x117) => DDC$RT.cast(__x117, DDC$RT.type((_StreamController<dynamic> _) {
}
), DDC$RT.type((StreamController<T> _) {
}
- ), "CastDynamic", """line 83, column 14 of dart:async/stream_controller.dart: """, __x90 is StreamController<T>, false))(sync ? new _NoCallbackSyncStreamController() : new _NoCallbackAsyncStreamController());
+ ), "CastDynamic", """line 83, column 14 of dart:async/stream_controller.dart: """, __x117 is StreamController<T>, false))(sync ? new _NoCallbackSyncStreamController() : new _NoCallbackAsyncStreamController());
}
return sync ? new _SyncStreamController<T>(onListen, onPause, onResume, onCancel) : new _AsyncStreamController<T>(onListen, onPause, onResume, onCancel);
}
@@ -47,11 +47,11 @@ part of dart.async;
_NotificationHandler get _onPause;
_NotificationHandler get _onResume;
_NotificationHandler get _onCancel;
- Stream<T> get stream => ((__x91) => DDC$RT.cast(__x91, DDC$RT.type((_ControllerStream<dynamic> _) {
+ Stream<T> get stream => ((__x118) => DDC$RT.cast(__x118, DDC$RT.type((_ControllerStream<dynamic> _) {
}
), DDC$RT.type((Stream<T> _) {
}
-), "CastExact", """line 293, column 27 of dart:async/stream_controller.dart: """, __x91 is Stream<T>, false))(new _ControllerStream(this));
+), "CastExact", """line 293, column 27 of dart:async/stream_controller.dart: """, __x118 is Stream<T>, false))(new _ControllerStream(this));
StreamSink<T> get sink => new _StreamSinkWrapper<T>(this);
bool get _isCanceled => (_state & _STATE_CANCELED) != 0;
bool get hasListener => (_state & _STATE_SUBSCRIBED) != 0;
@@ -175,7 +175,13 @@ assert (_isAddingStream); _StreamControllerAddStreamState addState = DDC$RT.cast
if (!_isInitialState) {
throw new StateError("Stream has already been listened to.");
}
- _ControllerSubscription subscription = new _ControllerSubscription(this, onData, onError, onDone, cancelOnError);
+ _ControllerSubscription subscription = new _ControllerSubscription(this, DDC$RT.wrap((void f(T __u119)) {
+void c(T x0) => f(DDC$RT.cast(x0, dynamic, T, "CastParam", """line 499, column 43 of dart:async/stream_controller.dart: """, x0 is T, false));
+ return f == null ? null : c;
+}
+, onData, DDC$RT.type((__t122<T> _) {
+}
+), __t120, "Wrap", """line 499, column 43 of dart:async/stream_controller.dart: """, onData is __t120), onError, onDone, cancelOnError);
_PendingEvents pendingEvents = _pendingEvents;
_state |= _STATE_SUBSCRIBED;
if (_isAddingStream) {
@@ -212,9 +218,9 @@ _StreamControllerAddStreamState addState = DDC$RT.cast(_varData, dynamic, DDC$RT
if (_onCancel != null) {
if (result == null) {
try {
- result = ((__x92) => DDC$RT.cast(__x92, dynamic, DDC$RT.type((Future<dynamic> _) {
+ result = ((__x124) => DDC$RT.cast(__x124, dynamic, DDC$RT.type((Future<dynamic> _) {
}
- ), "CastGeneral", """line 542, column 20 of dart:async/stream_controller.dart: """, __x92 is Future<dynamic>, true))(_onCancel());
+ ), "CastGeneral", """line 542, column 20 of dart:async/stream_controller.dart: """, __x124 is Future<dynamic>, true))(_onCancel());
}
catch (e, s) {
result = new _Future().._asyncCompleteError(e, s);
@@ -350,13 +356,13 @@ bool cancelOnError : true}
}
class _AddStreamState<T> {final _Future addStreamFuture;
final StreamSubscription addSubscription;
- _AddStreamState(_EventSink<T> controller, Stream source, bool cancelOnError) : addStreamFuture = new _Future(), addSubscription = source.listen(DDC$RT.wrap((void f(T __u93)) {
+ _AddStreamState(_EventSink<T> controller, Stream source, bool cancelOnError) : addStreamFuture = new _Future(), addSubscription = source.listen(DDC$RT.wrap((void f(T __u125)) {
void c(T x0) => f(DDC$RT.cast(x0, dynamic, T, "CastParam", """line 745, column 41 of dart:async/stream_controller.dart: """, x0 is T, false));
return f == null ? null : c;
}
-, controller._add, DDC$RT.type((__t96<T> _) {
+, controller._add, DDC$RT.type((__t126<T> _) {
}
-), __t94, "Wrap", """line 745, column 41 of dart:async/stream_controller.dart: """, controller._add is __t94), onError: ((__x98) => DDC$RT.cast(__x98, dynamic, Function, "CastGeneral", """line 746, column 50 of dart:async/stream_controller.dart: """, __x98 is Function, true))(cancelOnError ? makeErrorHandler(controller) : controller._addError), onDone: controller._close, cancelOnError: cancelOnError);
+), __t120, "Wrap", """line 745, column 41 of dart:async/stream_controller.dart: """, controller._add is __t120), onError: ((__x128) => DDC$RT.cast(__x128, dynamic, Function, "CastGeneral", """line 746, column 50 of dart:async/stream_controller.dart: """, __x128 is Function, true))(cancelOnError ? makeErrorHandler(controller) : controller._addError), onDone: controller._close, cancelOnError: cancelOnError);
static makeErrorHandler(_EventSink controller) => (e, StackTrace s) {
controller._addError(e, s);
controller._close();
@@ -394,5 +400,6 @@ addSubscription.pause();
}
}
}
- typedef void __t94(dynamic __u95);
- typedef void __t96<T>(T __u97);
+ typedef void __t120(dynamic __u121);
+ typedef void __t122<T>(T __u123);
+ typedef void __t126<T>(T __u127);
« no previous file with comments | « test/dart_codegen/expect/async/stream.dart ('k') | test/dart_codegen/expect/async/stream_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698