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

Unified Diff: lib/corelib.dart

Issue 8343037: Throw FallThroughError when we fall through a case in a switch statement. Fixes (Closed) Base URL: http://dart.googlecode.com/svn/experimental/frog/
Patch Set: '' Created 9 years, 2 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
« gen.dart ('K') | « gen.dart ('k') | tests/frog/frog.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/corelib.dart
===================================================================
--- lib/corelib.dart (revision 858)
+++ lib/corelib.dart (working copy)
@@ -92,7 +92,14 @@
final String dstName;
}
class FallThroughError {
- const FallThroughError() : super();
+ final String url;
+ final int line;
+
+ const FallThroughError(this.url, this.line);
+
+ String toString() {
+ return "Switch case fall-through in $url at line $line.";
+ }
}
// Dart core library.
« gen.dart ('K') | « gen.dart ('k') | tests/frog/frog.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698