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 fadef631bc3edfae5e93849c16c84fbfc6c65ae3..ffd60c1a577c5d189eb030d4bf46804049667f03 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,115 +1,5 @@ |
-library test; |
+library; |
import self as self; |
-import "dart:async" as asy; |
-import "dart:core" as core; |
-static method main() → dynamic { |
- function f0() → dynamic |
- return 42; |
- function f1() → dynamic /* originally async */ { |
- final asy::Completer<asy::FutureOr<dynamic>> :completer = asy::Completer::sync<asy::FutureOr<dynamic>>(); |
- asy::FutureOr<dynamic> :return_value; |
- dynamic :async_op_then; |
- dynamic :async_op_error; |
- dynamic :await_jump_var = 0; |
- dynamic :await_ctx_var; |
- function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
- try { |
- #L1: |
- { |
- :return_value = 42; |
- break #L1; |
- } |
- :completer.complete(:return_value); |
- return; |
- } |
- on dynamic catch(dynamic :exception, dynamic :stack_trace) { |
- :completer.completeError(:exception, :stack_trace); |
- } |
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
- asy::Future::microtask<dynamic>(:async_op); |
- return :completer.future; |
- } |
- function f2() → dynamic { |
- return 42; |
- } |
- function f3() → dynamic /* originally async */ { |
- final asy::Completer<asy::FutureOr<dynamic>> :completer = asy::Completer::sync<asy::FutureOr<dynamic>>(); |
- asy::FutureOr<dynamic> :return_value; |
- dynamic :async_op_then; |
- dynamic :async_op_error; |
- dynamic :await_jump_var = 0; |
- dynamic :await_ctx_var; |
- function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
- try { |
- #L2: |
- { |
- :return_value = 42; |
- break #L2; |
- } |
- :completer.complete(:return_value); |
- return; |
- } |
- on dynamic catch(dynamic :exception, dynamic :stack_trace) { |
- :completer.completeError(:exception, :stack_trace); |
- } |
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
- asy::Future::microtask<dynamic>(:async_op); |
- return :completer.future; |
- } |
- function f4() → dynamic /* originally sync* */ { |
- dynamic :await_jump_var = 0; |
- dynamic :await_ctx_var; |
- function :sync_op(core::Iterator<dynamic> :iterator) → core::bool yielding { |
- { |
- { |
- :iterator._current = 42; |
- [yield] true; |
- } |
- } |
- return false; |
- } |
- return new core::_SyncIterable::•(:sync_op); |
- } |
- function f5() → dynamic /* originally async* */ { |
- dynamic :controller; |
- dynamic :async_op_then; |
- dynamic :async_op_error; |
- dynamic :await_jump_var = 0; |
- dynamic :await_ctx_var; |
- dynamic :saved_try_context_var0; |
- dynamic :saved_try_context_var1; |
- function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
- try |
- try { |
- #L3: |
- { |
- if(:controller.add(42)) |
- return null; |
- else |
- [yield] null; |
- } |
- return; |
- } |
- on dynamic catch(dynamic :exception, dynamic :stack_trace) { |
- :controller.addError(:exception, :stack_trace); |
- } |
- finally { |
- :controller.close(); |
- } |
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
- :controller = new asy::_AsyncStarStreamController::•(:async_op); |
- return :controller.stream; |
- } |
- 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); |
- function f9() → dynamic |
- return f5.call(); |
-} |
+static method main() → dynamic |
+ throw "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 ^\npkg/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 ^"; |