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

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

Issue 10854140: Fix type inference for self-recursive functions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
Index: tests/compiler/dart2js/call_site_type_inferer_test.dart
diff --git a/tests/compiler/dart2js/call_site_type_inferer_test.dart b/tests/compiler/dart2js/call_site_type_inferer_test.dart
index 704cba584695580d30974f941284d8cef96b9112..eb8ff00a8c92340a1faf8196e35874d8cc159ef7 100644
--- a/tests/compiler/dart2js/call_site_type_inferer_test.dart
+++ b/tests/compiler/dart2js/call_site_type_inferer_test.dart
@@ -91,9 +91,6 @@ final String TEST_NINE = @"""
class A {
x(p1, p2) => x(p1, p2);
}
- void f(p) {
- p.x("x", "y");
- }
main() {
new A().x(1, 2);
}
@@ -112,6 +109,15 @@ final String TEST_TEN = @"""
}
""";
+final String TEST_ELEVEN = @"""
+ class A {
+ x(p1, p2) => x(1, 2);
+ }
+ main() {
+ new A().x("x", "y");
+ }
+""";
+
void runTest(String test, [List<HType> expectedTypes = null]) {
compileAndFind(
test,
@@ -137,7 +143,9 @@ void test() {
runTest(TEST_SIX, [HType.NUMBER]);
runTest(TEST_SEVEN);
runTest(TEST_EIGHT, [HType.INTEGER, HType.UNKNOWN]);
+ runTest(TEST_NINE, [HType.INTEGER, HType.INTEGER]);
runTest(TEST_TEN);
+ runTest(TEST_ELEVEN);
}
void main() {

Powered by Google App Engine
This is Rietveld 408576698