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

Side by Side Diff: pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart.strong.expect

Issue 2895063003: Flatten futures when inferring the type of an async function expression. (Closed)
Patch Set: Don't recurse on future-derived types Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 library test;
2 import self as self;
3 import "dart:async" as asy;
4 import "dart:core" as core;
5
6 static field asy::Future<core::int> futureInt = null;
7 static field () → asy::Future<core::int> f = () → dynamic => self::futureInt;
8 static field () → asy::Future<core::int> g = () → dynamic /* originally async */ {
9 final asy::Completer<asy::FutureOr<dynamic>> :completer = asy::Completer::sync <asy::FutureOr<dynamic>>();
10 asy::FutureOr<dynamic> :return_value;
11 dynamic :async_op_then;
12 dynamic :async_op_error;
13 dynamic :await_jump_var = 0;
14 dynamic :await_ctx_var;
15 function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace] ) → dynamic yielding
16 try {
17 #L1:
18 {
19 :return_value = self::futureInt;
20 break #L1;
21 }
22 :completer.complete(:return_value);
23 return;
24 }
25 on dynamic catch(dynamic :exception, dynamic :stack_trace) {
26 :completer.completeError(:exception, :stack_trace);
27 }
28 :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
29 :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
30 asy::Future::microtask<dynamic>(:async_op);
31 return :completer.future;
32 };
33 static method main() → dynamic {
34 self::f;
35 self::g;
36 }
OLDNEW
« no previous file with comments | « pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698