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

Unified Diff: frog/tests/leg/type_checker_test.dart

Issue 10387033: Add VoidElement and VoidType to make sure that there is a canonical void type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: frog/tests/leg/type_checker_test.dart
diff --git a/frog/tests/leg/type_checker_test.dart b/frog/tests/leg/type_checker_test.dart
index 5581929946e5d53762ca67ae38ed4ca85217baad..72696a225a12d5213ff27bc7c34b952acc82400b 100644
--- a/frog/tests/leg/type_checker_test.dart
+++ b/frog/tests/leg/type_checker_test.dart
@@ -237,6 +237,8 @@ void testMethodInvocations() {
/** Tests analysis of returns (not required by the specification). */
void testControlFlow() {
+ analyzeTopLevel("void foo() { if (true) { return; } }");
+ analyzeTopLevel("var foo() { if (true) { return; } }");
ngeoffray 2012/05/09 08:54:40 var -> Dynamic. var at this position is not allowe
karlklose 2012/05/09 10:32:41 Done, removed type.
analyzeTopLevel("int foo() { if (true) { return 1; } }",
MessageKind.MAYBE_MISSING_RETURN);
final bar =
« no previous file with comments | « no previous file | lib/compiler/implementation/elements/elements.dart » ('j') | lib/compiler/implementation/elements/elements.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698