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

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

Issue 2013763002: Add names and support for preserialized data to serialization tests (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 7 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/serialization/modelz.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ba7fa5655d4ff5549e743182b569564b32c58c76..fb0eac4b9c7c844a32e05832f11294b4cb8abbc5 100644
--- a/pkg/compiler/lib/src/dart_types.dart
+++ b/pkg/compiler/lib/src/dart_types.dart
@@ -377,8 +377,7 @@ abstract class GenericType extends DartType {
: this.element = element,
this.typeArguments = typeArguments,
this.containsMethodTypeVariableType =
- typeArguments.any(_typeContainsMethodTypeVariableType)
- {
+ typeArguments.any(_typeContainsMethodTypeVariableType) {
assert(invariant(CURRENT_ELEMENT_SPANNABLE, element != null,
message: "Missing element for generic type."));
assert(invariant(element, () {
@@ -446,8 +445,9 @@ abstract class GenericType extends DartType {
@override
DartType get dynamifyMethodTypeVariableType {
if (!containsMethodTypeVariableType) return this;
- List<DartType> newTypeArguments = typeArguments.map(
- (DartType type) => type.dynamifyMethodTypeVariableType).toList();
+ List<DartType> newTypeArguments = typeArguments
+ .map((DartType type) => type.dynamifyMethodTypeVariableType)
+ .toList();
return createInstantiation(newTypeArguments);
}
@@ -642,11 +642,11 @@ class FunctionType extends DartType {
this.optionalParameterTypes = optionalParameterTypes,
this.namedParameters = namedParameters,
this.namedParameterTypes = namedParameterTypes,
- this.containsMethodTypeVariableType =
- returnType.containsMethodTypeVariableType ||
- parameterTypes.any(_typeContainsMethodTypeVariableType) ||
- optionalParameterTypes.any(_typeContainsMethodTypeVariableType) ||
- namedParameterTypes.any(_typeContainsMethodTypeVariableType) {
+ this.containsMethodTypeVariableType = returnType
+ .containsMethodTypeVariableType ||
+ parameterTypes.any(_typeContainsMethodTypeVariableType) ||
+ optionalParameterTypes.any(_typeContainsMethodTypeVariableType) ||
+ namedParameterTypes.any(_typeContainsMethodTypeVariableType) {
assert(invariant(
CURRENT_ELEMENT_SPANNABLE, element == null || element.isDeclaration));
// Assert that optional and named parameters are not used at the same time.
@@ -784,13 +784,8 @@ class FunctionType extends DartType {
optionalParameterTypes.map(eraseIt).toList();
List<DartType> newNamedParameterTypes =
namedParameterTypes.map(eraseIt).toList();
- return new FunctionType.internal(
- element,
- newReturnType,
- newParameterTypes,
- newOptionalParameterTypes,
- namedParameters,
- newNamedParameterTypes);
+ return new FunctionType.internal(element, newReturnType, newParameterTypes,
+ newOptionalParameterTypes, namedParameters, newNamedParameterTypes);
}
@override
« no previous file with comments | « no previous file | pkg/compiler/lib/src/serialization/modelz.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698