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

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

Issue 2375103004: fix #27210, remove TypeParameterMember equality (Closed)
Patch Set: fix bound check to use == Created 4 years, 3 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/analyzer/lib/src/dart/element/member.dart ('k') | pkg/analyzer/lib/src/generated/type_system.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4c2e971b1d9f2e408b6cf5d21b72931170fc5c9d..55d2e40e74929eefeba30a76e2d28986c16fb703 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -2526,6 +2526,12 @@ class TypeParameterTypeImpl extends TypeImpl implements TypeParameterType {
: super(element, element.name);
@override
+ ElementLocation get definition => element.location;
+
+ @override
+ DartType get bound => element.bound ?? DynamicTypeImpl.instance;
+
+ @override
TypeParameterElement get element => super.element as TypeParameterElement;
@override
@@ -2533,7 +2539,7 @@ class TypeParameterTypeImpl extends TypeImpl implements TypeParameterType {
@override
bool operator ==(Object object) =>
- object is TypeParameterTypeImpl && (element == object.element);
+ object is TypeParameterTypeImpl && definition == object.definition;
@override
bool isMoreSpecificThan(DartType s,
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/member.dart ('k') | pkg/analyzer/lib/src/generated/type_system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698