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

Side by Side Diff: pkg/analyzer/lib/src/task/strong/checker.dart

Issue 1994243002: Dangling comment reference cleanup in analyzer. (Closed) Base URL: git@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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/task/inputs.dart ('k') | pkg/analyzer/lib/src/task/strong_mode.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 // TODO(jmesserly): this was ported from package:dev_compiler, and needs to be 5 // TODO(jmesserly): this was ported from package:dev_compiler, and needs to be
6 // refactored to fit into analyzer. 6 // refactored to fit into analyzer.
7 library analyzer.src.task.strong.checker; 7 library analyzer.src.task.strong.checker;
8 8
9 import 'package:analyzer/analyzer.dart'; 9 import 'package:analyzer/analyzer.dart';
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 // non-abstract class is not implementing an interface. See 985 // non-abstract class is not implementing an interface. See
986 // https://github.com/dart-lang/dart-dev-compiler/issues/25 986 // https://github.com/dart-lang/dart-dev-compiler/issues/25
987 while (parent != null && parent.element.isAbstract) { 987 while (parent != null && parent.element.isAbstract) {
988 parent.interfaces.forEach((i) => find(i, superInterfaces)); 988 parent.interfaces.forEach((i) => find(i, superInterfaces));
989 parent = parent.superclass; 989 parent = parent.superclass;
990 } 990 }
991 _checkInterfacesOverrides(node, superInterfaces, seen, 991 _checkInterfacesOverrides(node, superInterfaces, seen,
992 includeParents: false); 992 includeParents: false);
993 } 993 }
994 994
995 /// Check that individual methods and fields in [subType] correctly override 995 /// Check that individual methods and fields in [node] correctly override
996 /// the declarations in [baseType]. 996 /// the declarations in [baseType].
997 /// 997 ///
998 /// The [errorLocation] node indicates where errors are reported, see 998 /// The [errorLocation] node indicates where errors are reported, see
999 /// [_checkSingleOverride] for more details. 999 /// [_checkSingleOverride] for more details.
1000 _checkIndividualOverridesFromClass(ClassDeclaration node, 1000 _checkIndividualOverridesFromClass(ClassDeclaration node,
1001 InterfaceType baseType, Set<String> seen, bool isSubclass) { 1001 InterfaceType baseType, Set<String> seen, bool isSubclass) {
1002 for (var member in node.members) { 1002 for (var member in node.members) {
1003 if (member is FieldDeclaration) { 1003 if (member is FieldDeclaration) {
1004 if (member.isStatic) { 1004 if (member.isStatic) {
1005 continue; 1005 continue;
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 } while (!current.isObject && !visited.contains(current)); 1266 } while (!current.isObject && !visited.contains(current));
1267 } 1267 }
1268 1268
1269 void _recordMessage(StaticInfo info) { 1269 void _recordMessage(StaticInfo info) {
1270 if (info == null) return; 1270 if (info == null) return;
1271 var error = info.toAnalysisError(); 1271 var error = info.toAnalysisError();
1272 if (error.errorCode.errorSeverity == ErrorSeverity.ERROR) _failure = true; 1272 if (error.errorCode.errorSeverity == ErrorSeverity.ERROR) _failure = true;
1273 _reporter.onError(error); 1273 _reporter.onError(error);
1274 } 1274 }
1275 } 1275 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/task/inputs.dart ('k') | pkg/analyzer/lib/src/task/strong_mode.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698