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

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

Issue 2769703002: Revert "Issue 28580. Relax instantiate to bounds." (Closed)
Patch Set: Created 3 years, 9 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/analyzer/lib/src/dart/element/type.dart
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index 1c750450521601688c7992e0c86d6960d3a731ba..55075e8489698e1ba15879034d26b40fd65ac934 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -2470,11 +2470,6 @@ abstract class TypeImpl implements DartType {
final String name;
/**
- * The cached value for [hasTypeParameterReferenceInBound].
- */
- bool _hasTypeParameterReferenceInBound;
-
- /**
* Initialize a newly created type to be declared by the given [element] and
* to have the given [name].
*/
@@ -2486,33 +2481,6 @@ abstract class TypeImpl implements DartType {
@override
Element get element => _element;
- /**
- * Return `true` if the type is parameterized and has a type parameter with
- * the bound that references a type parameter.
- */
- bool get hasTypeParameterReferenceInBound {
- if (_hasTypeParameterReferenceInBound == null) {
- bool hasTypeParameterReference(DartType type) {
- if (type is TypeParameterType) {
- return true;
- } else if (type is ParameterizedType) {
- return type.typeArguments.any(hasTypeParameterReference);
- } else {
- return false;
- }
- }
-
- Element element = this.element;
- if (element is TypeParameterizedElement) {
- _hasTypeParameterReferenceInBound = element.typeParameters
- .any((parameter) => hasTypeParameterReference(parameter.bound));
- } else {
- _hasTypeParameterReferenceInBound = false;
- }
- }
- return _hasTypeParameterReferenceInBound;
- }
-
@override
bool get isBottom => false;
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart ('k') | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698