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

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

Issue 16381003: Quick check for self in InterfaceTypeImpl.getLeastUpperBound() (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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_experimental/lib/src/generated/element.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/element.dart b/pkg/analyzer_experimental/lib/src/generated/element.dart
index 8c825215603eff4fa5eef3bfc5661080f165c2b3..98ec24155ad6581803804af5383d03d5a7fc334d 100644
--- a/pkg/analyzer_experimental/lib/src/generated/element.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/element.dart
@@ -5798,6 +5798,9 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
return typedInterfaces;
}
Type2 getLeastUpperBound(Type2 type) {
+ if (identical(type, this)) {
+ return this;
+ }
Type2 dynamicType = DynamicTypeImpl.instance;
if (identical(this, dynamicType) || identical(type, dynamicType)) {
return dynamicType;

Powered by Google App Engine
This is Rietveld 408576698