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

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

Issue 2054323002: Fix exit detection for try statements. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add tests without a "finally" clause 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/all_the_rest_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 226f5e50b096b39280f2b9f6349dcbfcd5c96b22..74760a506a11e9bc981e787303638b6ba0c818d7 100644
--- a/pkg/analyzer/test/generated/non_hint_code_test.dart
+++ b/pkg/analyzer/test/generated/non_hint_code_test.dart
@@ -18,6 +18,25 @@ main() {
@reflectiveTest
class NonHintCodeTest extends ResolverTestCase {
+ void test_deadCode_afterTryCatch() {
+ Source source = addSource('''
+main() {
+ try {
+ return f();
+ } catch (e) {
+ print(e);
+ }
+ print('not dead');
+}
+f() {
+ throw 'foo';
+}
+''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_deadCode_deadBlock_conditionalElse_debugConst() {
Source source = addSource(r'''
const bool DEBUG = true;
« no previous file with comments | « pkg/analyzer/test/generated/all_the_rest_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698