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

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

Issue 2905353002: Add type inference logic for map literals (Closed)
Patch Set: Created 3 years, 6 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
OLDNEW
(Empty)
1 library test;
2 import self as self;
3 import "dart:core" as core;
4 import "dart:async" as asy;
5
6 abstract class MyStream<T extends core::Object> extends asy::Stream<self::MyStre am::T> {
7 static factory •<T extends core::Object>() → dynamic
8 return null;
9 }
10 static method foo() → asy::Stream<core::List<core::int>> /* originally async* */ {
11 dynamic :controller;
12 dynamic :async_op_then;
13 dynamic :async_op_error;
14 dynamic :await_jump_var = 0;
15 dynamic :await_ctx_var;
16 dynamic :saved_try_context_var0;
17 dynamic :saved_try_context_var1;
18 function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace] ) → dynamic yielding
19 try
20 try {
21 #L1:
22 {
23 if(:controller.add(<core::int>[]))
24 return null;
25 else
26 [yield] null;
27 if(:controller.add(self::MyStream::•<dynamic>()))
28 return null;
29 else
30 [yield] null;
31 if(:controller.addStream(<dynamic>[]))
32 return null;
33 else
34 [yield] null;
35 if(:controller.addStream(self::MyStream::•<core::List<core::int>>()))
36 return null;
37 else
38 [yield] null;
39 }
40 return;
41 }
42 on dynamic catch(dynamic :exception, dynamic :stack_trace) {
43 :controller.addError(:exception, :stack_trace);
44 }
45 finally {
46 :controller.close();
47 }
48 :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
49 :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
50 :controller = new asy::_AsyncStarStreamController::•(:async_op);
51 return :controller.stream;
52 }
53 static method bar() → core::Iterable<core::Map<core::int, core::int>> /* origina lly sync* */ {
54 dynamic :await_jump_var = 0;
55 dynamic :await_ctx_var;
56 function :sync_op(core::Iterator<dynamic> :iterator) → core::bool yielding {
57 {
58 {
59 :iterator._current = <core::int, core::int>{};
60 [yield] true;
61 }
62 {
63 :iterator._current = core::List::_internal<dynamic>();
64 [yield] true;
65 }
66 {
67 :iterator.isYieldEach = true;
68 :iterator._current = <dynamic, dynamic>{};
69 [yield] true;
70 }
71 {
72 :iterator.isYieldEach = true;
73 :iterator._current = core::List::_internal<core::Map<core::int, core::in t>>();
74 [yield] true;
75 }
76 }
77 return false;
78 }
79 return new core::_SyncIterable::•(:sync_op);
80 }
81 static method main() → dynamic {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698