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

Unified Diff: pkg/compiler/lib/src/elements/resolution_types.dart

Issue 2567133002: Add support for the new function-type syntax. (Closed)
Patch Set: Fixes after rebase. Created 3 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: pkg/compiler/lib/src/elements/resolution_types.dart
diff --git a/pkg/compiler/lib/src/elements/resolution_types.dart b/pkg/compiler/lib/src/elements/resolution_types.dart
index b8ed4fb8c1b169a802d0f2ee00bcee4cae82245f..0f4b7bf10382f6be1c6ac6f5e8d5fef3efe3993d 100644
--- a/pkg/compiler/lib/src/elements/resolution_types.dart
+++ b/pkg/compiler/lib/src/elements/resolution_types.dart
@@ -642,6 +642,16 @@ class ResolutionFunctionType extends ResolutionDartType
optionalParameterTypes, namedParameters, namedParameterTypes);
}
+ factory ResolutionFunctionType.generalized(
+ ResolutionDartType returnType,
+ List<ResolutionDartType> parameterTypes,
+ List<ResolutionDartType> optionalParameterTypes,
+ List<String> namedParameters,
+ List<ResolutionDartType> namedParameterTypes) {
+ return new ResolutionFunctionType.internal(null, returnType, parameterTypes,
+ optionalParameterTypes, namedParameters, namedParameterTypes);
+ }
+
ResolutionFunctionType.internal(FunctionTypedElement this.element,
[ResolutionDartType returnType = const ResolutionDynamicType(),
List<ResolutionDartType> parameterTypes = const <ResolutionDartType>[],

Powered by Google App Engine
This is Rietveld 408576698