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

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

Issue 1943443002: If an if or do statement always exits, following statements are dead. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: test_ prefixes Created 4 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
« 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 9fc1dfb311802623f4f9e70422f44aa7148fb980..226f5e50b096b39280f2b9f6349dcbfcd5c96b22 100644
--- a/pkg/analyzer/test/generated/non_hint_code_test.dart
+++ b/pkg/analyzer/test/generated/non_hint_code_test.dart
@@ -158,6 +158,19 @@ f() {
verify([source]);
}
+ void test_deadCode_statementAfterIfWithoutElse() {
+ Source source = addSource(r'''
+f() {
+ if (1 < 0) {
+ return;
+ }
+ int a = 1;
+}''');
+ 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