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

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

Issue 1038213003: Downward inference (Closed) Base URL: git@github.com:dart-lang/dart-dev-compiler.git@master
Patch Set: Address comments Created 5 years, 9 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
Index: test/dart_codegen/expect/async/future_impl.dart
diff --git a/test/dart_codegen/expect/async/future_impl.dart b/test/dart_codegen/expect/async/future_impl.dart
index 112287c3b3849129deb886c5217db629ef304971..4f40c58d0018f50d2dde66e68875544c02bbffc2 100644
--- a/test/dart_codegen/expect/async/future_impl.dart
+++ b/test/dart_codegen/expect/async/future_impl.dart
@@ -58,14 +58,14 @@ future._completeError(error, stackTrace);
bool get hasErrorTest => (state == STATE_CATCHERROR_TEST);
bool get handlesComplete => (state == STATE_WHENCOMPLETE);
_FutureOnValue get _onValue {
-assert (handlesValue); return DEVC$RT.cast(callback, Function, __t14, "ImplicitCast", """line 112, column 12 of dart:async/future_impl.dart: """, callback is __t14, true);
+assert (handlesValue); return DEVC$RT.cast(callback, Function, __t12, "ImplicitCast", """line 112, column 12 of dart:async/future_impl.dart: """, callback is __t12, true);
}
Function get _onError => errorCallback;
_FutureErrorTest get _errorTest {
-assert (hasErrorTest); return DEVC$RT.cast(callback, Function, __t16, "CompositeCast", """line 117, column 12 of dart:async/future_impl.dart: """, callback is __t16, false);
+assert (hasErrorTest); return DEVC$RT.cast(callback, Function, __t14, "CompositeCast", """line 117, column 12 of dart:async/future_impl.dart: """, callback is __t14, false);
}
_FutureAction get _whenCompleteAction {
-assert (handlesComplete); return DEVC$RT.cast(callback, Function, __t18, "ImplicitCast", """line 121, column 12 of dart:async/future_impl.dart: """, callback is __t18, true);
+assert (handlesComplete); return DEVC$RT.cast(callback, Function, __t16, "ImplicitCast", """line 121, column 12 of dart:async/future_impl.dart: """, callback is __t16, true);
}
}
class _Future<T> implements Future<T> {static const int _INCOMPLETE = 0;
@@ -101,13 +101,13 @@ Function onError}
) {
_Future result = new _Future();
if (!identical(result._zone, _ROOT_ZONE)) {
-f = ((__x22) => DEVC$RT.wrap((dynamic f(dynamic __u19)) {
+f = ((__x20) => DEVC$RT.wrap((dynamic f(dynamic __u17)) {
dynamic c(dynamic x0) => f(x0);
return f == null ? null : c;
}
-, __x22, __t14, DEVC$RT.type((__t20<T> _) {
+, __x20, __t12, DEVC$RT.type((__t18<T> _) {
}
-), "Wrap", """line 208, column 11 of dart:async/future_impl.dart: """, __x22 is __t20<T>))(result._zone.registerUnaryCallback(f));
+), "Wrap", """line 208, column 11 of dart:async/future_impl.dart: """, __x20 is __t18<T>))(result._zone.registerUnaryCallback(f));
if (onError != null) {
onError = _registerErrorHandler(onError, result._zone);
}
@@ -121,11 +121,11 @@ bool test(error)}
_Future result = new _Future();
if (!identical(result._zone, _ROOT_ZONE)) {
onError = _registerErrorHandler(onError, result._zone);
- if (test != null) test = ((__x25) => DEVC$RT.wrap((dynamic f(dynamic __u24)) {
-dynamic c(dynamic x0) => ((__x23) => DEVC$RT.cast(__x23, dynamic, bool, "CastResult", """line 221, column 32 of dart:async/future_impl.dart: """, __x23 is bool, true))(f(x0));
+ if (test != null) test = ((__x23) => DEVC$RT.wrap((dynamic f(dynamic __u22)) {
+dynamic c(dynamic x0) => ((__x21) => DEVC$RT.cast(__x21, dynamic, bool, "CastResult", """line 221, column 32 of dart:async/future_impl.dart: """, __x21 is bool, true))(f(x0));
return f == null ? null : c;
}
-, __x25, __t14, __t16, "Wrap", """line 221, column 32 of dart:async/future_impl.dart: """, __x25 is __t16))(result._zone.registerUnaryCallback(test));
+, __x23, __t12, __t14, "Wrap", """line 221, column 32 of dart:async/future_impl.dart: """, __x23 is __t14))(result._zone.registerUnaryCallback(test));
}
_addListener(new _FutureListener.catchError(result, onError, test));
return result;
@@ -142,11 +142,7 @@ action = result._zone.registerCallback(action);
}
), "CompositeCast", """line 233, column 12 of dart:async/future_impl.dart: """, result is Future<T>, false);
}
- Stream<T> asStream() => ((__x26) => DEVC$RT.cast(__x26, DEVC$RT.type((Stream<dynamic> _) {
-}
-), DEVC$RT.type((Stream<T> _) {
-}
-), "InferableAllocation", """line 236, column 27 of dart:async/future_impl.dart: """, __x26 is Stream<T>, false))(new Stream.fromFuture(this));
+ Stream<T> asStream() => new Stream<T>.fromFuture(this);
void _markPendingCompletion() {
if (!_mayComplete) throw new StateError("Future already completed");
_state = _PENDING_COMPLETE;
@@ -331,7 +327,7 @@ AsyncError asyncError = source._error;
if (listener.hasErrorTest) {
_FutureErrorTest test = listener._errorTest;
try {
- matchesTest = ((__x27) => DEVC$RT.cast(__x27, dynamic, bool, "DynamicCast", """line 499, column 29 of dart:async/future_impl.dart: """, __x27 is bool, true))(zone.runUnary(test, asyncError.error));
+ matchesTest = ((__x24) => DEVC$RT.cast(__x24, dynamic, bool, "DynamicCast", """line 499, column 29 of dart:async/future_impl.dart: """, __x24 is bool, true))(zone.runUnary(test, asyncError.error));
}
catch (e, s) {
listenerValueOrError = identical(asyncError.error, e) ? asyncError : new AsyncError(e, s);
@@ -345,7 +341,7 @@ AsyncError asyncError = source._error;
listenerValueOrError = zone.runBinary(errorCallback, asyncError.error, asyncError.stackTrace);
}
else {
- listenerValueOrError = zone.runUnary(DEVC$RT.cast(errorCallback, Function, __t14, "ImplicitCast", """line 515, column 54 of dart:async/future_impl.dart: """, errorCallback is __t14, true), asyncError.error);
+ listenerValueOrError = zone.runUnary(DEVC$RT.cast(errorCallback, Function, __t12, "ImplicitCast", """line 515, column 54 of dart:async/future_impl.dart: """, errorCallback is __t12, true), asyncError.error);
}
}
catch (e, s) {
@@ -478,7 +474,7 @@ timer.cancel();
return result;
}
}
- typedef dynamic __t14(dynamic __u15);
- typedef bool __t16(dynamic __u17);
- typedef dynamic __t18();
- typedef dynamic __t20<T>(T __u21);
+ typedef dynamic __t12(dynamic __u13);
+ typedef bool __t14(dynamic __u15);
+ typedef dynamic __t16();
+ typedef dynamic __t18<T>(T __u19);

Powered by Google App Engine
This is Rietveld 408576698