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

Unified Diff: pkg/analyzer/lib/src/summary/prelink.dart

Issue 1841433002: Fix summary handling of enum values. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/summary/public_namespace_computer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/prelink.dart
diff --git a/pkg/analyzer/lib/src/summary/prelink.dart b/pkg/analyzer/lib/src/summary/prelink.dart
index 75f748da714b37becbdf2f0337754d9eb28c356c..6b92f993b1fd26b3920730025f3bb8d847716216 100644
--- a/pkg/analyzer/lib/src/summary/prelink.dart
+++ b/pkg/analyzer/lib/src/summary/prelink.dart
@@ -285,8 +285,16 @@ class _Prelinker {
});
}
for (UnlinkedEnum enm in unit.enums) {
- privateNamespace.putIfAbsent(enm.name,
- () => new _Meaning(unitNum, ReferenceKind.classOrEnum, 0, 0));
+ privateNamespace.putIfAbsent(enm.name, () {
+ Map<String, _Meaning> namespace = <String, _Meaning>{};
+ enm.values.forEach((UnlinkedEnumValue value) {
+ namespace[value.name] =
+ new _Meaning(unitNum, ReferenceKind.propertyAccessor, 0, 0);
+ });
+ namespace['values'] =
+ new _Meaning(unitNum, ReferenceKind.propertyAccessor, 0, 0);
+ return new _ClassMeaning(unitNum, 0, 0, namespace);
+ });
}
for (UnlinkedExecutable executable in unit.executables) {
privateNamespace.putIfAbsent(
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/public_namespace_computer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698