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

Unified Diff: pkg/compiler/lib/src/dart_types.dart

Issue 2567133002: Add support for the new function-type syntax. (Closed)
Patch Set: Remove obsolete named argument. Created 3 years, 12 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: pkg/compiler/lib/src/dart_types.dart
diff --git a/pkg/compiler/lib/src/dart_types.dart b/pkg/compiler/lib/src/dart_types.dart
index b151ed99b75193dfdc0ca3a52022f190c841e35f..ffc4ffe48bd583797a248196235d43f6a25efc27 100644
--- a/pkg/compiler/lib/src/dart_types.dart
+++ b/pkg/compiler/lib/src/dart_types.dart
@@ -615,6 +615,16 @@ class FunctionType extends DartType {
optionalParameterTypes, namedParameters, namedParameterTypes);
}
+ factory FunctionType.generalized(
+ DartType returnType,
+ List<DartType> parameterTypes,
+ List<DartType> optionalParameterTypes,
+ List<String> namedParameters,
+ List<DartType> namedParameterTypes) {
+ return new FunctionType.internal(null, returnType, parameterTypes,
+ optionalParameterTypes, namedParameters, namedParameterTypes);
+ }
+
FunctionType.internal(FunctionTypedElement this.element,
[DartType returnType = const DynamicType(),
List<DartType> parameterTypes = const <DartType>[],

Powered by Google App Engine
This is Rietveld 408576698