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

Unified Diff: pkg/analyzer/lib/src/fasta/element_store.dart

Issue 2788913002: Prepare for separate setter scope. (Closed)
Patch Set: Address comments. Created 3 years, 8 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 | « pkg/analyzer/lib/src/fasta/analyzer.dart ('k') | pkg/analyzer/test/generated/parser_fasta_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/fasta/element_store.dart
diff --git a/pkg/analyzer/lib/src/fasta/element_store.dart b/pkg/analyzer/lib/src/fasta/element_store.dart
index 8d90278471a5d78ae013a6ced8d4164fbb332683..c6a1049bb5dbdbbba37df03c3338bdd2b176f55f 100644
--- a/pkg/analyzer/lib/src/fasta/element_store.dart
+++ b/pkg/analyzer/lib/src/fasta/element_store.dart
@@ -75,7 +75,7 @@ class ElementStoreImplementation implements ElementStore {
KernelLibraryElement element = new KernelLibraryElement(unit);
elements[library] = element;
unit.library = element;
- library.members.forEach((String name, Builder builder) {
+ library.forEach((String name, Builder builder) {
do {
if (builder is ClassBuilder) {
elements[builder] = new KernelClassElement(builder);
@@ -105,12 +105,9 @@ class ElementStoreImplementation implements ElementStore {
Constructor getCoreClassConstructorReference(String className,
{String constructorName, String library}) {
assert(library == null);
- KernelClassBuilder cls = coreLibrary.members[className];
- Constructor constructor = constructorName == null
- ? cls.cls.constructors.first
- : cls.cls.constructors
- .firstWhere((Constructor c) => c.name.name == constructorName);
- return constructor;
+ return coreLibrary
+ .getConstructor(className, constructorName: constructorName)
+ .target;
}
Library getLibraryReference(LibraryElement element) {
« no previous file with comments | « pkg/analyzer/lib/src/fasta/analyzer.dart ('k') | pkg/analyzer/test/generated/parser_fasta_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698