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

Unified Diff: pkg/analysis_server/lib/src/computer/computer_highlights2.dart

Issue 2484883002: Highlight FieldFormalParameterElement as a field only in declaration. (Closed)
Patch Set: Created 4 years, 1 month 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/analysis_server/test/analysis/notification_highlights_test2.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/computer/computer_highlights2.dart
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights2.dart b/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
index bfc9d66570df1e85bdb842f5b027435753038557..7d67c261e07f292f47c9fb1c5458b76ff9e39d0b 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
@@ -170,7 +170,9 @@ class DartUnitHighlightsComputer2 {
bool _addIdentifierRegion_field(SimpleIdentifier node) {
Element element = node.bestElement;
if (element is FieldFormalParameterElement) {
- element = (element as FieldFormalParameterElement).field;
+ if (node.parent is FieldFormalParameter) {
+ element = (element as FieldFormalParameterElement).field;
+ }
}
// prepare type
HighlightRegionType type;
« no previous file with comments | « no previous file | pkg/analysis_server/test/analysis/notification_highlights_test2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698