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

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

Issue 2653203002: Use entities in CommonElements interface. (Closed)
Patch Set: Created 3 years, 11 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 | « pkg/compiler/lib/src/core_types.dart ('k') | pkg/compiler/lib/src/inferrer/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d8c775b5f7aa673619a8fe0f0a94af7aa24ee83d..b8ed4fb8c1b169a802d0f2ee00bcee4cae82245f 100644
--- a/pkg/compiler/lib/src/elements/resolution_types.dart
+++ b/pkg/compiler/lib/src/elements/resolution_types.dart
@@ -1667,7 +1667,8 @@ class Types implements DartTypes {
ResolutionDartType computeLeastUpperBoundFunctionTypes(
ResolutionFunctionType a, ResolutionFunctionType b) {
if (a.parameterTypes.length != b.parameterTypes.length) {
- return commonElements.functionType;
+ ResolutionInterfaceType functionType = commonElements.functionType;
+ return functionType;
}
ResolutionDartType returnType =
computeLeastUpperBound(a.returnType, b.returnType);
@@ -1749,10 +1750,12 @@ class Types implements DartTypes {
}
if (a.isFunctionType) {
- a = commonElements.functionType;
+ ResolutionInterfaceType functionType = commonElements.functionType;
+ a = functionType;
}
if (b.isFunctionType) {
- b = commonElements.functionType;
+ ResolutionInterfaceType functionType = commonElements.functionType;
+ b = functionType;
}
if (a.isInterfaceType && b.isInterfaceType) {
@@ -1795,7 +1798,9 @@ class Types implements DartTypes {
ResolutionTypeVariableType variable = type;
type = variable.element.bound;
if (type == originalType) {
- type = resolution.commonElements.objectType;
+ ResolutionInterfaceType objectType =
+ resolution.commonElements.objectType;
+ type = objectType;
}
}
if (type.isMalformed) {
@@ -1839,7 +1844,9 @@ class Types implements DartTypes {
return null;
}
if (type.isFunctionType) {
- type = resolution.commonElements.functionType;
+ ResolutionInterfaceType functionType =
+ resolution.commonElements.functionType;
+ type = functionType;
}
assert(invariant(NO_LOCATION_SPANNABLE, type.isInterfaceType,
message: "unexpected type kind ${type.kind}."));
« no previous file with comments | « pkg/compiler/lib/src/core_types.dart ('k') | pkg/compiler/lib/src/inferrer/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698