blob: c939a0accb6e113d34ea8795e268bca8f7caf4f4 [file] [log] [blame]
// Errors:
//
// pkg/front_end/testcases/inference/infer_local_function_referenced_before_declaration.dart:9:74: Error: Method not found: 'g'.
// /*@returnType=dynamic*/ f() => /*error:REFERENCED_BEFORE_DECLARATION*/ g();
// ^
library test;
import self as self;
import "dart:core" as core;
static method test() dynamic {
function f() dynamic
return throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#g, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
{
invalid-expression "pkg/front_end/testcases/inference/infer_local_function_referenced_before_declaration.dart:14:3: Error: Can't declare 'g' because it was already used in this scope.
g() => 0;
^";
function g() core::int
return 0;
}
() dynamic v = f;
}
static method main() dynamic {}