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

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

Issue 2064203002: Do not error on dead, mandated statements at end of switch cases (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Two tests 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
« no previous file with comments | « pkg/analyzer/test/generated/hint_code_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/non_hint_code_test.dart
diff --git a/pkg/analyzer/test/generated/non_hint_code_test.dart b/pkg/analyzer/test/generated/non_hint_code_test.dart
index 74760a506a11e9bc981e787303638b6ba0c818d7..13abb033c61f3ade9cce1eca22d910bf5a05c31b 100644
--- a/pkg/analyzer/test/generated/non_hint_code_test.dart
+++ b/pkg/analyzer/test/generated/non_hint_code_test.dart
@@ -190,6 +190,26 @@ f() {
verify([source]);
}
+ void test_deadCode_deadFinalBreakInCase() {
+ Source source = addSource(r'''
+f() {
+ switch (true) {
+ case true:
+ try {
+ int a = 1;
+ } finally {
+ return;
+ }
+ break;
+ default:
+ break;
+ }
+}''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_deprecatedMemberUse_inDeprecatedClass() {
Source source = addSource(r'''
@deprecated
« no previous file with comments | « pkg/analyzer/test/generated/hint_code_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698