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

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

Issue 147353010: Infer types for compile-time constant closures. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file and one more test. Created 6 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/simple_inferrer_const_closure2_test.dart
diff --git a/tests/compiler/dart2js/simple_inferrer_const_closure_test.dart b/tests/compiler/dart2js/simple_inferrer_const_closure2_test.dart
similarity index 63%
copy from tests/compiler/dart2js/simple_inferrer_const_closure_test.dart
copy to tests/compiler/dart2js/simple_inferrer_const_closure2_test.dart
index 7b7be1a6da440c65728f34c064aa84760dbc9292..d8bdeb37f35c9874dad70544130620c55f3e5987 100644
--- a/tests/compiler/dart2js/simple_inferrer_const_closure_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_const_closure2_test.dart
@@ -8,28 +8,19 @@ import 'compiler_helper.dart';
const String TEST = """
-method1() {
- return 42;
-}
-
-method2(a) { // Called only via [foo2] with a small integer.
+method(a) { // Called via [foo] with integer then double.
return a;
}
-const foo1 = method1;
-const foo2 = method2;
+const foo = method;
-returnInt1() {
- return foo1();
-}
-
-returnInt2() {
- return foo2(54);
+returnNum(x) {
+ return foo(x);
}
main() {
- returnInt1();
- returnInt2();
+ returnNum(10);
+ returnNum(10.5);
}
""";
@@ -47,10 +38,7 @@ void main() {
name);
}
- checkReturn('method1', compiler.typesTask.uint31Type);
- checkReturn('returnInt1', compiler.typesTask.uint31Type);
-
- checkReturn('method2', compiler.typesTask.uint31Type);
- checkReturn('returnInt2', compiler.typesTask.uint31Type);
+ checkReturn('method', compiler.typesTask.numType);
+ checkReturn('returnNum', compiler.typesTask.numType);
}));
}
« no previous file with comments | « tests/compiler/dart2js/dart2js.status ('k') | tests/compiler/dart2js/simple_inferrer_const_closure3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698