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

Unified Diff: tests/compiler/dart2js/simple_inferrer_try_catch_test.dart

Issue 20052002: Small inferrer improvments, and one refactoring in the inferrer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | « sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
===================================================================
--- tests/compiler/dart2js/simple_inferrer_try_catch_test.dart (revision 25405)
+++ tests/compiler/dart2js/simple_inferrer_try_catch_test.dart (working copy)
@@ -135,6 +135,15 @@
}
}
+returnInt7() {
+ var a = 'foo';
+ try {
+ a = 42;
+ return a;
+ } catch (e) {
+ }
+ return 2;
+}
main() {
returnInt1();
@@ -149,6 +158,7 @@
returnDyn5();
returnInt6();
returnDyn6();
+ returnInt7();
}
""";
@@ -173,6 +183,7 @@
checkReturn('returnInt5', typesTask.intType);
checkReturn('returnInt6',
new TypeMask.nonNullSubtype(compiler.intClass.rawType));
+ checkReturn('returnInt7', typesTask.intType);
var subclassOfInterceptor =
findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698