| library test; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/inference/infer_local_function_referenced_before_declaration.dart:9:76: Warning: Method not found: 'g'. |
| // /*@ returnType=dynamic */ f() => /*error:REFERENCED_BEFORE_DECLARATION*/ g(); |
| // ^ |
| // |
| // 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; |
| // ^ |
| // pkg/front_end/testcases/inference/infer_local_function_referenced_before_declaration.dart:9:76: Context: Previous use of 'g'. |
| // /*@ returnType=dynamic */ f() => /*error:REFERENCED_BEFORE_DECLARATION*/ g(); |
| // ^ |
| // |
| 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(#C1, 32, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))); |
| { |
| 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() → dynamic |
| return 0; |
| } |
| dynamic v = f; |
| } |
| static method main() → dynamic {} |
| |
| constants { |
| #C1 = #g |
| #C2 = <core::Type*>[] |
| #C3 = <dynamic>[] |
| #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3} |
| } |