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

Unified Diff: pkg/analyzer/lib/src/dart/element/builder.dart

Issue 2016543002: Resynthesize FieldFormalParameterElementImpl(s) lazily. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/builder.dart
diff --git a/pkg/analyzer/lib/src/dart/element/builder.dart b/pkg/analyzer/lib/src/dart/element/builder.dart
index 08de907a9c3e890079a93bd9c8025f5741aba952..fb59f7b802a3ccb9ea53c462cace45cf46b63537 100644
--- a/pkg/analyzer/lib/src/dart/element/builder.dart
+++ b/pkg/analyzer/lib/src/dart/element/builder.dart
@@ -1303,7 +1303,7 @@ class ElementBuilder extends RecursiveAstVisitor<Object> {
int count = fields.length;
for (int i = 0; i < count; i++) {
FieldElement field = fields[i];
- _fieldMap[field.name] = field;
+ _fieldMap[field.name] ??= field;
Brian Wilkerson 2016/05/25 23:14:49 Inline field to avoid a list access when not neces
}
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698