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

Unified Diff: pkg/analyzer/lib/src/generated/testing/element_factory.dart

Issue 1143003007: Fix handling of nested typedefs (for real this time). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 | « pkg/analyzer/lib/src/generated/element.dart ('k') | pkg/analyzer/test/generated/element_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/testing/element_factory.dart
diff --git a/pkg/analyzer/lib/src/generated/testing/element_factory.dart b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
index d82da2a3331c1063ac6cd35ac7ab0d533df080da..1c844cc3f7a8a94cf2562828132815b5afb121d4 100644
--- a/pkg/analyzer/lib/src/generated/testing/element_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
@@ -55,7 +55,7 @@ class ElementFactory {
new List<TypeParameterTypeImpl>(count);
for (int i = 0; i < count; i++) {
TypeParameterElementImpl typeParameter =
- new TypeParameterElementImpl(parameterNames[i], 0);
+ typeParameterElement(parameterNames[i]);
typeParameters[i] = typeParameter;
typeParameterTypes[i] = new TypeParameterTypeImpl(typeParameter);
typeParameter.type = typeParameterTypes[i];
@@ -346,6 +346,14 @@ class ElementFactory {
return functionElement;
}
+ static FunctionTypeAliasElementImpl functionTypeAliasElement(String name) {
+ FunctionTypeAliasElementImpl functionTypeAliasElement =
+ new FunctionTypeAliasElementImpl(name, -1);
+ functionTypeAliasElement.type =
+ new FunctionTypeImpl.forTypedef(functionTypeAliasElement);
+ return functionTypeAliasElement;
+ }
+
static PropertyAccessorElementImpl getterElement(
String name, bool isStatic, DartType type) {
FieldElementImpl field = new FieldElementImpl(name, -1);
@@ -537,4 +545,7 @@ class ElementFactory {
}
return variable;
}
+
+ static TypeParameterElementImpl typeParameterElement(String name) =>
+ new TypeParameterElementImpl(name, 0);
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/element.dart ('k') | pkg/analyzer/test/generated/element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698