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

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

Issue 141713007: Revert "Infer types for compile-time constant closures." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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_closure4_test.dart
diff --git a/tests/compiler/dart2js/simple_inferrer_const_closure4_test.dart b/tests/compiler/dart2js/simple_inferrer_const_closure4_test.dart
deleted file mode 100644
index 33f1049700f9da8ac3100ad77180909f96692543..0000000000000000000000000000000000000000
--- a/tests/compiler/dart2js/simple_inferrer_const_closure4_test.dart
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// 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.
-
-import 'package:expect/expect.dart';
-import "package:async_helper/async_helper.dart";
-import 'compiler_helper.dart';
-
-const String TEST = """
-
-method(a) { // Called via [foo] with integer then double.
- return a;
-}
-
-const foo = method;
-
-returnNum(x) {
- return foo(x);
-}
-
-main() {
- returnNum(10);
- returnNum(10.5);
-}
-""";
-
-
-void main() {
- Uri uri = new Uri(scheme: 'source');
- var compiler = compilerFor(TEST, uri);
- asyncTest(() => compiler.runCompiler(uri).then((_) {
- var typesInferrer = compiler.typesTask.typesInferrer;
-
- checkArgument(String functionName, String type) {
- var functionElement = findElement(compiler, functionName);
- var signature = functionElement.functionSignature;
- var element = signature.requiredParameters.first;
- Expect.equals(type,
- typesInferrer.getTypeOfElement(element).simplify(compiler),
- functionName);
- }
-
- checkArgument('method', compiler.typesTask.numType);
- checkArgument('returnNum', compiler.typesTask.numType);
- }));
-}

Powered by Google App Engine
This is Rietveld 408576698