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

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

Issue 12095011: Properly register types on the JS foreign instruction. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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
===================================================================
--- tests/compiler/dart2js/call_site_type_inferer_test.dart (revision 18037)
+++ tests/compiler/dart2js/call_site_type_inferer_test.dart (working copy)
@@ -138,7 +138,7 @@
f(p) => p.x(2.2);
main() {
new A().x(1);
- f(null);
+ f(new A());
}
""";
@@ -190,6 +190,18 @@
}
""";
+const String TEST_18 = r"""
+ class A {
+ x(p1, p2) => x(p1, p2);
+ }
+ class B extends A {
+ }
+ main() {
+ new B().x("a", "b");
+ new A().x(1, 2);
+ }
+""";
+
void doTest(String test,
bool enableInlining,
List<HType> expectedTypes,
@@ -229,7 +241,7 @@
runTest(TEST_7);
runTest(TEST_8, [HType.INTEGER, HType.UNKNOWN]);
runTest(TEST_9, [HType.INTEGER, HType.INTEGER]);
- runTest(TEST_10);
+ runTest(TEST_10, [HType.INTEGER, HType.INTEGER]);
runTest(TEST_11);
defaultTypes = new OptionalParameterTypes(1);
@@ -255,6 +267,8 @@
defaultTypes.update(0, const SourceString("p2"), HType.INTEGER);
defaultTypes.update(1, const SourceString("p3"), HType.STRING);
runTest(TEST_17, [HType.INTEGER, HType.BOOLEAN, HType.DOUBLE], defaultTypes);
+
+ runTest(TEST_18);
}
void main() {
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/types.dart ('k') | tests/compiler/dart2js/type_combination_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698