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

Side by Side Diff: pkg/analyzer/lib/src/generated/resolver.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.generated.resolver; 5 library analyzer.src.generated.resolver;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 4199 matching lines...) Expand 10 before | Expand all | Expand 10 after
4210 */ 4210 */
4211 InheritanceManager _manager; 4211 InheritanceManager _manager;
4212 4212
4213 GatherUsedLocalElementsVisitor _usedLocalElementsVisitor; 4213 GatherUsedLocalElementsVisitor _usedLocalElementsVisitor;
4214 4214
4215 HintGenerator(this._compilationUnits, this._context, this._errorListener) { 4215 HintGenerator(this._compilationUnits, this._context, this._errorListener) {
4216 _library = _compilationUnits[0].element.library; 4216 _library = _compilationUnits[0].element.library;
4217 _usedImportedElementsVisitor = 4217 _usedImportedElementsVisitor =
4218 new GatherUsedImportedElementsVisitor(_library); 4218 new GatherUsedImportedElementsVisitor(_library);
4219 _enableDart2JSHints = _context.analysisOptions.dart2jsHint; 4219 _enableDart2JSHints = _context.analysisOptions.dart2jsHint;
4220 _manager = new InheritanceManager(_library); 4220 _manager =
4221 new InheritanceManager(_library, includeAbstractFromSuperclasses: true);
4221 _usedLocalElementsVisitor = new GatherUsedLocalElementsVisitor(_library); 4222 _usedLocalElementsVisitor = new GatherUsedLocalElementsVisitor(_library);
4222 } 4223 }
4223 4224
4224 void generateForLibrary() { 4225 void generateForLibrary() {
4225 PerformanceStatistics.hints.makeCurrentWhile(() { 4226 PerformanceStatistics.hints.makeCurrentWhile(() {
4226 int length = _compilationUnits.length; 4227 int length = _compilationUnits.length;
4227 for (int i = 0; i < length; i++) { 4228 for (int i = 0; i < length; i++) {
4228 CompilationUnit unit = _compilationUnits[i]; 4229 CompilationUnit unit = _compilationUnits[i];
4229 CompilationUnitElement element = unit.element; 4230 CompilationUnitElement element = unit.element;
4230 if (element != null) { 4231 if (element != null) {
(...skipping 6807 matching lines...) Expand 10 before | Expand all | Expand 10 after
11038 return null; 11039 return null;
11039 } 11040 }
11040 if (identical(node.staticElement, variable)) { 11041 if (identical(node.staticElement, variable)) {
11041 if (node.inSetterContext()) { 11042 if (node.inSetterContext()) {
11042 result = true; 11043 result = true;
11043 } 11044 }
11044 } 11045 }
11045 return null; 11046 return null;
11046 } 11047 }
11047 } 11048 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698