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

Unified Diff: tests/compiler/dart2js_optimizer/call_site_types_1_test.dart

Issue 10827181: Collect call site information and use that for estimating parameter types (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments 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_optimizer/call_site_types_1_test.dart
diff --git a/tests/language/compile_time_constant_p_test.dart b/tests/compiler/dart2js_optimizer/call_site_types_1_test.dart
similarity index 52%
copy from tests/language/compile_time_constant_p_test.dart
copy to tests/compiler/dart2js_optimizer/call_site_types_1_test.dart
index a0ff240865f126781264a7375416950bab92f910..5de399b0c2507249ec87490ed39a7558e125492d 100644
--- a/tests/language/compile_time_constant_p_test.dart
+++ b/tests/compiler/dart2js_optimizer/call_site_types_1_test.dart
@@ -2,19 +2,16 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// Test that different types at call sites still handles parameters correct.
ahe 2012/08/07 11:23:26 I would rather have a unit test. I have something
Søren Gjesse 2012/08/08 10:36:02 Done.
class A {
- const A(
- this.x /// 01: compile-time error
- );
- final x = null;
+ x(p) => p[0];
}
-class B extends A {
- const B();
+f(a) {
+ Expect.isNull(a.x(new List(1)));
+ Expect.throws(() => new A().x(1), (e) => e is NoSuchMethodException);
}
-var b = const B();
-
main() {
- Expect.equals(null, b.x);
+ f(new A());
}

Powered by Google App Engine
This is Rietveld 408576698