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

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

Issue 1434983006: tweak FunctionTypeImpl to support generic methods (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: format & sort Created 5 years, 1 month 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
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 f348ea845bfe48de66ad9c9ef6c5c530670183bf..dff33e9fc75407b3b2835469da6a4a66516af484 100644
--- a/pkg/analyzer/lib/src/generated/testing/element_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
@@ -121,8 +121,8 @@ class ElementFactory {
constructor.parameters = <ParameterElement>[];
}
constructor.returnType = type;
- FunctionTypeImpl constructorType = new FunctionTypeImpl(constructor);
- constructor.type = constructorType;
+ constructor.enclosingElement = definingClass;
+ constructor.type = new FunctionTypeImpl(constructor);
return constructor;
}
@@ -477,16 +477,15 @@ class ElementFactory {
}
static MethodElementImpl methodElementWithParameters(
+ ClassElement enclosingElement,
String methodName,
- List<DartType> typeArguments,
DartType returnType,
List<ParameterElement> parameters) {
MethodElementImpl method = new MethodElementImpl(methodName, 0);
+ method.enclosingElement = enclosingElement;
method.parameters = parameters;
method.returnType = returnType;
- FunctionTypeImpl methodType = new FunctionTypeImpl(method);
- methodType.typeArguments = typeArguments;
- method.type = methodType;
+ method.type = new FunctionTypeImpl(method);
return method;
}

Powered by Google App Engine
This is Rietveld 408576698