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

Unified Diff: pkg/analyzer/lib/src/generated/element.dart

Issue 728513002: Remove some (but not all) unused methods in analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/analyzer/lib/src/generated/element.dart
diff --git a/pkg/analyzer/lib/src/generated/element.dart b/pkg/analyzer/lib/src/generated/element.dart
index 58710601cee2240373d18192cf099f1bc02e43c2..617faf3ff742ecb6b6f7ac72fe4ac41782afa1cd 100644
--- a/pkg/analyzer/lib/src/generated/element.dart
+++ b/pkg/analyzer/lib/src/generated/element.dart
@@ -6812,44 +6812,6 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
}
/**
- * Return the "least upper bound" of the given types under the assumption that the types have the
- * same element and differ only in terms of the type arguments. The resulting type is composed by
- * comparing the corresponding type arguments, keeping those that are the same, and using
- * 'dynamic' for those that are different.
- *
- * @param firstType the first type
- * @param secondType the second type
- * @return the "least upper bound" of the given types
- */
- static InterfaceType _leastUpperBound(InterfaceType firstType, InterfaceType secondType) {
- if (firstType == secondType) {
- return firstType;
- }
- List<DartType> firstArguments = firstType.typeArguments;
- List<DartType> secondArguments = secondType.typeArguments;
- int argumentCount = firstArguments.length;
- if (argumentCount == 0) {
- return firstType;
- }
- List<DartType> lubArguments = new List<DartType>(argumentCount);
- for (int i = 0; i < argumentCount; i++) {
- //
- // Ideally we would take the least upper bound of the two argument types, but this can cause
- // an infinite recursion (such as when finding the least upper bound of String and num).
- //
- if (firstArguments[i] == secondArguments[i]) {
- lubArguments[i] = firstArguments[i];
- }
- if (lubArguments[i] == null) {
- lubArguments[i] = DynamicTypeImpl.instance;
- }
- }
- InterfaceTypeImpl lub = new InterfaceTypeImpl.con1(firstType.element);
- lub.typeArguments = lubArguments;
- return lub;
- }
-
- /**
* An array containing the actual types of the type arguments.
*/
List<DartType> typeArguments = TypeImpl.EMPTY_ARRAY;

Powered by Google App Engine
This is Rietveld 408576698