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

Unified Diff: pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart

Issue 2228233003: Remove false positive from override hint (issue 27046) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | 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/dart/resolver/inheritance_manager.dart
diff --git a/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart b/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart
index 0e0229cb5ebc28b2a811a395312a2e2548ef3748..476334ba6ef0b98206c1f138b222c03a3635c8ca 100644
--- a/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart
@@ -28,6 +28,12 @@ class InheritanceManager {
LibraryElement _library;
/**
+ * A flag indicating whether abstract methods should be included when looking
+ * up the superclass chain.
+ */
+ bool _includeAbstractFromSuperclasses;
+
+ /**
* This is a mapping between each [ClassElement] and a map between the [String] member
* names and the associated [ExecutableElement] in the mixin and superclass chain.
*/
@@ -51,8 +57,10 @@ class InheritanceManager {
*
* @param library the library element context that the inheritance mappings are being generated
*/
- InheritanceManager(LibraryElement library) {
+ InheritanceManager(LibraryElement library,
+ {bool includeAbstractFromSuperclasses: false}) {
scheglov 2016/08/10 01:23:38 At some point we discussed a possible optimization
this._library = library;
+ _includeAbstractFromSuperclasses = includeAbstractFromSuperclasses;
_classLookup = new HashMap<ClassElement, Map<String, ExecutableElement>>();
_interfaceLookup =
new HashMap<ClassElement, Map<String, ExecutableElement>>();
@@ -282,7 +290,8 @@ class InheritanceManager {
//
// Include the members from the superclass in the resultMap.
//
- _recordMapWithClassMembers(resultMap, supertype, false);
+ _recordMapWithClassMembers(
+ resultMap, supertype, _includeAbstractFromSuperclasses);
} finally {
visitedClasses.remove(superclassElt);
}
@@ -311,7 +320,8 @@ class InheritanceManager {
//
// Include the members from the mixin in the resultMap.
//
- _recordMapWithClassMembers(map, mixin, false);
+ _recordMapWithClassMembers(
+ map, mixin, _includeAbstractFromSuperclasses);
//
// Add the members from map into result map.
//
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698