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

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

Issue 2950213002: Infer the return types of local functions where appropriate. (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
1 library test; 1 library test;
2 import self as self; 2 import self as self;
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:async" as asy;
4 5
5 const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/inference /infer_local_function_return_type.dart:31:51: Error: Previous use of 'f9'.\n f8 () => /*error:REFERENCED_BEFORE_DECLARATION*/ f9();\n ^"]/* from null */;
6 static method test() → dynamic { 6 static method test() → dynamic {
7 function f0() → dynamic 7 function f0() → core::int
8 return 42; 8 return 42;
9 function f1() → dynamic async 9 function f1() → asy::Future<core::int> async
10 return 42; 10 return 42;
11 function f2() → dynamic { 11 function f2() → core::int {
12 return 42; 12 return 42;
13 } 13 }
14 function f3() → dynamic async { 14 function f3() → asy::Future<core::int> async {
15 return 42; 15 return 42;
16 } 16 }
17 function f4() → dynamic sync* { 17 function f4() → core::Iterable<core::int> sync* {
18 yield 42; 18 yield 42;
19 } 19 }
20 function f5() → dynamic async* { 20 function f5() → asy::Stream<core::int> async* {
21 yield 42; 21 yield 42;
22 } 22 }
23 function f6() → core::num 23 function f6() → core::num
24 return 42; 24 return 42;
25 function f7() → dynamic 25 function f7() → dynamic
26 return f7.call(); 26 return f7.call();
27 function f8() → dynamic 27 function f8() → asy::Stream<core::int>
28 return throw new core::NoSuchMethodError::_withType(null, #f9, 32, <dynamic> [].toList(growable: false), <dynamic, dynamic>{}, null); 28 return f5.call();
29 const core::_ConstantExpressionError::•()._throw(new core::_CompileTimeError:: •("pkg/front_end/testcases/inference/infer_local_function_return_type.dart:32:3: Error: Can't declare 'f9' because it was already used in this scope.\n f9() => f5();\n ^")); 29 () → core::int v0 = f0;
30 () → asy::Future<core::int> v1 = f1;
31 () → core::int v2 = f2;
32 () → asy::Future<core::int> v3 = f3;
33 () → core::Iterable<core::int> v4 = f4;
34 () → asy::Stream<core::int> v5 = f5;
35 () → core::num v6 = f6;
36 () → dynamic v7 = f7;
37 () → asy::Stream<core::int> v8 = f8;
30 } 38 }
31 static method main() → dynamic {} 39 static method main() → dynamic {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698