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

Unified Diff: tests/compiler/dart2js/type_checker_test.dart

Issue 1158453002: Allow `return;` in async method. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/typechecker.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/type_checker_test.dart
diff --git a/tests/compiler/dart2js/type_checker_test.dart b/tests/compiler/dart2js/type_checker_test.dart
index 1d717e53ce2520e831afdeabb340b267e8337395..939640d559660c0bfacbdec70eb749d274ece8a8 100644
--- a/tests/compiler/dart2js/type_checker_test.dart
+++ b/tests/compiler/dart2js/type_checker_test.dart
@@ -2038,7 +2038,7 @@ testAsyncReturn(MockCompiler compiler) {
return analyzeTopLevel(code, expectedWarnings);
}
return Future.wait([
- check("Future<int> foo() async { return; }", MessageKind.RETURN_NOTHING),
+ check("Future<int> foo() async { return; }"),
check("Future<int> foo() async { return null; }"),
check("Future<int> foo() async { return 0; }"),
check("Future<int> foo() async { return ''; }", NOT_ASSIGNABLE),
@@ -2053,7 +2053,7 @@ testAsyncReturn(MockCompiler compiler) {
check("void foo() async { return 0; }", MessageKind.RETURN_VALUE_IN_VOID),
check("void foo() async { return new Future.value(); }",
MessageKind.RETURN_VALUE_IN_VOID),
- check("int foo() async { return; }", MessageKind.RETURN_NOTHING),
+ check("int foo() async { return; }"),
check("int foo() async { return 0; }", NOT_ASSIGNABLE),
check("int foo() async { return new Future<int>.value(); }",
NOT_ASSIGNABLE),
« no previous file with comments | « pkg/compiler/lib/src/typechecker.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698