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

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

Issue 581733002: New analyzer snaphot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rollback Java changes Created 6 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/generated/ast.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f5025e8283e07292077ae5104ff14e60dc5dc5a0..34f381d189e41191b0bf1b8a7820466d10473d8e 100644
--- a/pkg/analyzer/lib/src/generated/element.dart
+++ b/pkg/analyzer/lib/src/generated/element.dart
@@ -11207,46 +11207,26 @@ class UnionTypeImpl extends TypeImpl implements UnionType {
@override
bool internalIsMoreSpecificThan(DartType type, bool withDynamic, Set<TypeImpl_TypePair> visitedTypePairs) {
- // TODO(collinsn): what version of subtyping do we want?
+ // What version of subtyping do we want? See discussion below in [internalIsSubtypeOf].
//
// The more unsound version: any.
- /*
- for (Type t : types) {
- if (((TypeImpl) t).internalIsMoreSpecificThan(type, withDynamic, visitedTypePairs)) {
+ for (DartType t in _types) {
+ if ((t as TypeImpl).internalIsMoreSpecificThan(type, withDynamic, visitedTypePairs)) {
return true;
}
}
return false;
- */
- // The less unsound version: all.
- for (DartType t in _types) {
- if (!(t as TypeImpl).internalIsMoreSpecificThan(type, withDynamic, visitedTypePairs)) {
- return false;
- }
- }
- return true;
}
@override
bool internalIsSubtypeOf(DartType type, Set<TypeImpl_TypePair> visitedTypePairs) {
- // TODO(collinsn): what version of subtyping do we want?
- //
// The more unsound version: any.
- /*
- for (Type t : types) {
- if (((TypeImpl) t).internalIsSubtypeOf(type, visitedTypePairs)) {
+ for (DartType t in _types) {
+ if ((t as TypeImpl).internalIsSubtypeOf(type, visitedTypePairs)) {
return true;
}
}
return false;
- */
- // The less unsound version: all.
- for (DartType t in _types) {
- if (!(t as TypeImpl).internalIsSubtypeOf(type, visitedTypePairs)) {
- return false;
- }
- }
- return true;
}
/**
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698