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 0173d8d238286af875c2bc5131cceff43e432258..8ef5f3745accac23e69e22d693c325d72897c047 100644 |
--- a/tests/compiler/dart2js/type_checker_test.dart |
+++ b/tests/compiler/dart2js/type_checker_test.dart |
@@ -100,6 +100,8 @@ Future testReturn(MockCompiler compiler) { |
check(returnWithType("void", 1), MessageKind.RETURN_VALUE_IN_VOID), |
check(returnWithType("void", null)), |
check(returnWithType("String", ""), MessageKind.RETURN_NOTHING), |
+ check(arrowReturnWithType("void", "4")), |
+ check("void set foo(x) => 5;"), |
// check("String foo() {};"), // Should probably fail. |
]); |
} |
@@ -2615,6 +2617,10 @@ String returnWithType(String type, expression) { |
return "$type foo() { return $expression; }"; |
} |
+String arrowReturnWithType(String type, expression) { |
+ return "$type foo() => $expression;"; |
+} |
+ |
Node parseExpression(String text) => |
parseBodyCode(text, (parser, token) => parser.parseExpression(token)); |