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

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

Issue 1977413002: Improve type information and minor clean up (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/ast/utilities.dart ('k') | pkg/analyzer/lib/src/dart/element/handle.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/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index b0c03be5d55f1bcf810b9c03be9580e53660d187..f10356dd73a968ea059ad4ff020f094af3f88059 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -2067,12 +2067,13 @@ abstract class ElementImpl implements Element {
}
@override
- Element getAncestor(Predicate<Element> predicate) {
+ Element/*=E*/ getAncestor/*<E extends Element >*/(
+ Predicate<Element> predicate) {
Element ancestor = _enclosingElement;
while (ancestor != null && !predicate(ancestor)) {
ancestor = ancestor.enclosingElement;
}
- return ancestor;
+ return ancestor as Element/*=E*/;
}
/**
@@ -4153,7 +4154,9 @@ class MultiplyDefinedElementImpl implements MultiplyDefinedElement {
AstNode computeNode() => null;
@override
- Element getAncestor(Predicate<Element> predicate) => null;
+ Element/*=E*/ getAncestor/*<E extends Element >*/(
+ Predicate<Element> predicate) =>
+ null;
@override
String getExtendedDisplayName(String shortName) {
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/utilities.dart ('k') | pkg/analyzer/lib/src/dart/element/handle.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698