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

Unified Diff: pkg/analyzer/test/generated/all_the_rest_test.dart

Issue 2067843002: ExitDetector: Don't short-circuit return on non-exiting case statements (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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: pkg/analyzer/test/generated/all_the_rest_test.dart
diff --git a/pkg/analyzer/test/generated/all_the_rest_test.dart b/pkg/analyzer/test/generated/all_the_rest_test.dart
index 8adce9de86a7d1c93efd445ac04e937c576edffe..ba1ba0082e83a854e5eb3d0ca2a3f25647ddd044 100644
--- a/pkg/analyzer/test/generated/all_the_rest_test.dart
+++ b/pkg/analyzer/test/generated/all_the_rest_test.dart
@@ -4033,6 +4033,20 @@ void f() {
_assertNthStatementDoesNotExit(source, 0);
}
+ void test_whileStatement_switchWithBreakWithLabel() {
+ Source source = addSource(r'''
+void f() {
+ x: while (true) {
+ switch (true) {
+ case false: break;
+ case true: break x;
+ }
+ }
+}
+''');
+ _assertNthStatementDoesNotExit(source, 0);
+ }
+
void test_whileStatement_breakWithLabel_afterExting() {
Source source = addSource(r'''
void f() {
« pkg/analyzer/lib/src/generated/resolver.dart ('K') | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698