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

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

Issue 17017003: Introduce an ElementTypeMask to recognize simple constraints like "the type of parameter foo is the… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « tests/compiler/dart2js/concrete_type_inference_test.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_test.dart
===================================================================
--- tests/compiler/dart2js/simple_inferrer_test.dart (revision 24183)
+++ tests/compiler/dart2js/simple_inferrer_test.dart (working copy)
@@ -359,6 +359,11 @@
return topLevelConstList[0];
}
+testReturnItselfOrInt(a) {
+ if (a) return 42;
+ return testReturnItselfOrInt(a);
+}
+
var topLevelConstList = const [42];
get topLevelGetter => 42;
@@ -467,6 +472,7 @@
..returnInt9();
testReturnElementOfConstList1();
testReturnElementOfConstList2();
+ testReturnItselfOrInt(topLevelGetter());
}
""";
@@ -541,6 +547,7 @@
checkReturn('testBreak2', typesInferrer.intType.nullable());
checkReturn('testReturnElementOfConstList1', typesInferrer.intType);
checkReturn('testReturnElementOfConstList2', typesInferrer.intType);
+ checkReturn('testReturnItselfOrInt', typesInferrer.intType);
checkReturnInClass(String className, String methodName, type) {
var cls = findElement(compiler, className);
« no previous file with comments | « tests/compiler/dart2js/concrete_type_inference_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698