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

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

Issue 1035443002: Implement new flatten specification. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comment. Created 5 years, 9 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/type_test_helper.dart
diff --git a/tests/compiler/dart2js/type_test_helper.dart b/tests/compiler/dart2js/type_test_helper.dart
index 45cd843b60a2f749caf7de9bfd9dc788ce3503f8..f571b36d3d3ddca5e763ad8e16d5d6ffdcade2df 100644
--- a/tests/compiler/dart2js/type_test_helper.dart
+++ b/tests/compiler/dart2js/type_test_helper.dart
@@ -41,7 +41,9 @@ class TypeEnvironment {
Compiler compiler;
bool stopAfterTypeInference = mainSource != null;
if (mainSource == null) {
- source = 'main() {}\n$source';
+ source = '''import 'dart:async';
+ main() {}
+ $source''';
} else {
source = '$mainSource\n$source';
}
@@ -123,6 +125,10 @@ class TypeEnvironment {
return compiler.types.computeLeastUpperBound(T, S);
}
+ DartType flatten(DartType T) {
+ return compiler.types.flatten(T);
+ }
+
FunctionType functionType(DartType returnType,
List<DartType> parameters,
{List<DartType> optionalParameters:

Powered by Google App Engine
This is Rietveld 408576698