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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/testcases/inference/infer_local_function_return_type.dart.strong.expect
diff --git a/pkg/front_end/testcases/inference/infer_local_function_return_type.dart.strong.expect b/pkg/front_end/testcases/inference/infer_local_function_return_type.dart.strong.expect
index 0f610b5949b9ead50607f3e72574eb5ae2847f50..13b68a191d7a865e7ef216229569e5115e1166b1 100644
--- a/pkg/front_end/testcases/inference/infer_local_function_return_type.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_local_function_return_type.dart.strong.expect
@@ -1,31 +1,39 @@
library test;
import self as self;
import "dart:core" as core;
+import "dart:async" as asy;
-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 */;
static method test() → dynamic {
- function f0() → dynamic
+ function f0() → core::int
return 42;
- function f1() → dynamic async
+ function f1() → asy::Future<core::int> async
return 42;
- function f2() → dynamic {
+ function f2() → core::int {
return 42;
}
- function f3() → dynamic async {
+ function f3() → asy::Future<core::int> async {
return 42;
}
- function f4() → dynamic sync* {
+ function f4() → core::Iterable<core::int> sync* {
yield 42;
}
- function f5() → dynamic async* {
+ function f5() → asy::Stream<core::int> async* {
yield 42;
}
function f6() → core::num
return 42;
function f7() → dynamic
return f7.call();
- function f8() → dynamic
- return throw new core::NoSuchMethodError::_withType(null, #f9, 32, <dynamic>[].toList(growable: false), <dynamic, dynamic>{}, null);
- 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 ^"));
+ function f8() → asy::Stream<core::int>
+ return f5.call();
+ () → core::int v0 = f0;
+ () → asy::Future<core::int> v1 = f1;
+ () → core::int v2 = f2;
+ () → asy::Future<core::int> v3 = f3;
+ () → core::Iterable<core::int> v4 = f4;
+ () → asy::Stream<core::int> v5 = f5;
+ () → core::num v6 = f6;
+ () → dynamic v7 = f7;
+ () → asy::Stream<core::int> v8 = f8;
}
static method main() → dynamic {}

Powered by Google App Engine
This is Rietveld 408576698