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

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

Issue 10916003: Create the union of parameter types if several selectors match the same function (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
« no previous file with comments | « lib/compiler/implementation/js_backend/backend.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/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 49e021506c985195c9effd961470f8bb91be8850..7c0a85e5b0ae3c380e45b24c843b802452196564 100644
--- a/tests/compiler/dart2js/call_site_type_inferer_test.dart
+++ b/tests/compiler/dart2js/call_site_type_inferer_test.dart
@@ -128,6 +128,17 @@ const String TEST_12 = @"""
}
""";
+const String TEST_13 = @"""
+ class A {
+ x(p) => 1;
+ }
+ f(p) => p.x(2.2);
+ main() {
+ new A().x(1);
+ f(null);
+ }
+""";
+
void runTest(String test, [List<HType> expectedTypes = null]) {
compileAndFind(
test,
@@ -157,6 +168,7 @@ void test() {
runTest(TEST_10);
runTest(TEST_11);
runTest(TEST_12);
+ runTest(TEST_13, [HType.NUMBER]);
}
void main() {
« no previous file with comments | « lib/compiler/implementation/js_backend/backend.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698