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

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

Issue 2882893002: Store Typedef(s) in kernel when parsing with Fasta, deserilize in DillLibraryBuilder. (Closed)
Patch Set: Add the new file. Created 3 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/fasta/mock_element.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 c6a1049bb5dbdbbba37df03c3338bdd2b176f55f..537bc9011b6183488931b0e92686bee80a56c251 100644
--- a/pkg/analyzer/lib/src/fasta/element_store.dart
+++ b/pkg/analyzer/lib/src/fasta/element_store.dart
@@ -79,6 +79,8 @@ class ElementStoreImplementation implements ElementStore {
do {
if (builder is ClassBuilder) {
elements[builder] = new KernelClassElement(builder);
+ } else if (builder is KernelFunctionTypeAliasBuilder) {
+ elements[builder] = new KernelFunctionTypeAliasElement(builder);
} else if (builder is DillMemberBuilder) {
Member member = builder.member;
if (member is Field) {} else if (member is Procedure) {
@@ -289,6 +291,27 @@ class KernelClassElement extends MockClassElement {
}
}
+class KernelFunctionTypeAliasElement extends MockFunctionTypeAliasElement {
+ final KernelFunctionTypeAliasBuilder builder;
+
+ KernelFunctionTypeAliasElement(this.builder);
+
+ @override
+ analyzer.DartType get returnType {
+ return internalError("not supported.");
+ }
+
+ @override
+ analyzer.FunctionType get type {
+ return internalError("not supported.");
+ }
+
+ @override
+ List<TypeParameterElement> get typeParameters {
+ return internalError("not supported.");
+ }
+}
+
class KernelInterfaceType extends MockInterfaceType {
final KernelClassElement element;
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/fasta/mock_element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698