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

Side by Side Diff: pkg/analyzer/test/src/task/strong/checker_test.dart

Issue 2609993002: Use the function name as the location for a missing return error. (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/error_verifier.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.test.src.task.strong.checker_test; 5 library analyzer.test.src.task.strong.checker_test;
6 6
7 import 'package:test_reflective_loader/test_reflective_loader.dart'; 7 import 'package:test_reflective_loader/test_reflective_loader.dart';
8 8
9 import 'strong_test_helper.dart'; 9 import 'strong_test_helper.dart';
10 10
(...skipping 2335 matching lines...) Expand 10 before | Expand all | Expand 10 after
2346 int m1() => 42; 2346 int m1() => 42;
2347 } 2347 }
2348 class C extends B { 2348 class C extends B {
2349 /*error:IMPLICIT_DYNAMIC_RETURN*/m0() => 123; 2349 /*error:IMPLICIT_DYNAMIC_RETURN*/m0() => 123;
2350 m1() => 123; 2350 m1() => 123;
2351 dynamic m2() => 'hi'; 2351 dynamic m2() => 'hi';
2352 } 2352 }
2353 2353
2354 // accessors 2354 // accessors
2355 set x(int value) {} 2355 set x(int value) {}
2356 /*error:IMPLICIT_DYNAMIC_RETURN*/get y0 => 42; 2356 get /*error:IMPLICIT_DYNAMIC_RETURN*/y0 => 42;
2357 dynamic get y1 => 42; 2357 dynamic get y1 => 42;
2358 2358
2359 // function typed formals 2359 // function typed formals
2360 void ftf0(/*error:IMPLICIT_DYNAMIC_RETURN*/f(int x)) {} 2360 void ftf0(/*error:IMPLICIT_DYNAMIC_RETURN*/f(int x)) {}
2361 void ftf1(dynamic f(int x)) {} 2361 void ftf1(dynamic f(int x)) {}
2362 2362
2363 // function expressions 2363 // function expressions
2364 var fe0 = (int x) => x as dynamic; 2364 var fe0 = (int x) => x as dynamic;
2365 var fe1 = (int x) => x; 2365 var fe1 = (int x) => x;
2366 '''); 2366 ''');
(...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after
4016 // Regression test for https://github.com/dart-lang/sdk/issues/25069 4016 // Regression test for https://github.com/dart-lang/sdk/issues/25069
4017 checkFile(''' 4017 checkFile('''
4018 typedef int Foo(); 4018 typedef int Foo();
4019 void foo() {} 4019 void foo() {}
4020 void main () { 4020 void main () {
4021 Foo x = /*error:INVALID_ASSIGNMENT,info:USE_OF_VOID_RESULT*/foo(); 4021 Foo x = /*error:INVALID_ASSIGNMENT,info:USE_OF_VOID_RESULT*/foo();
4022 } 4022 }
4023 '''); 4023 ''');
4024 } 4024 }
4025 } 4025 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/error_verifier.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698