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

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

Issue 781683004: Replace hints. Resolve TODO. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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/test/generated/incremental_resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/incremental_resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
index f6d17c00b2a9b837616b5c529ec99c2cc7bbcd31..f91c6388815cf2bac5b828d899a88d7be6dde5c7 100644
--- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
@@ -729,11 +729,16 @@ class IncrementalResolver {
* be determined.
*/
bool _elementModelChanged(AstNode node) {
- // If we are replacing the whole declaration (e.g. rename a parameter), we
- // can try to find the corresponding Element in the enclosing one, see if it
- // is compatible, and if 'yes', then restore and update it.
- // TODO(scheglov) This should be rewritten. It causes validating the whole
- // class, when just one method is changed.
+ // If we are replacing the whole declaration, this means that its signature
+ // is changed. It might be an API change, or not.
+ //
+ // If a required parameter is change, it is not an API change, but we want
Brian Wilkerson 2014/12/04 14:45:22 "change" --> "changed"
+ // to find the existing corresponding Element in the enclosing one,
+ // set it for the node and update as needed.
+ //
+ // If, for example, the name of a method is changed, it is an API change,
+ // we need to know the old Element and the new Element. Again, we need to
+ // check the whole enclosing Element.
if (node is Declaration) {
node = node.parent;
}
@@ -1184,12 +1189,7 @@ class PoorMansIncrementalResolver {
_librarySource,
errors);
}
- {
- List<AnalysisError> oldErrors =
- _entry.getValueInLibrary(DartEntry.HINTS, _librarySource);
- List<AnalysisError> errors = _updateErrors(oldErrors, _newHints);
- _entry.setValueInLibrary(DartEntry.HINTS, _librarySource, errors);
- }
+ _entry.setValueInLibrary(DartEntry.HINTS, _librarySource, _newHints);
}
List<AnalysisError> _updateErrors(List<AnalysisError> oldErrors,
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/incremental_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698