Files
sdk/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.direct.expect
T
Paul Berry 4d8b18a3b3 Infer return types of local functions appropriately in non-strong mode.
Fixes #30629

Change-Id: I4928521c8b2714167c3cfbd971d2dcb9d3aa79b5
Reviewed-on: https://dart-review.googlesource.com/4141
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-09-07 20:25:05 +00:00

10 lines
588 B
Plaintext

library;
import self as self;
import "dart:core" as core;
static const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/illegal_named_function_expression_scope.dart:7:9: Error: A function expression can't have a return type.\n print(void f() {});\n ^", "pkg/front_end/testcases/illegal_named_function_expression_scope.dart:7:14: Error: A function expression can't have a name.\n print(void f() {});\n ^"]/* from null */;
static method main() → dynamic {
function f() → void {}
core::print(let final () → void f = () → dynamic {} in f);
}