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

Unified Diff: pkg/analyzer/lib/src/generated/testing/test_type_provider.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/test_type_provider.dart
diff --git a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
index 5b5204a3d752f8acde2fc57558a13ab4179b9f3c..3b08997f1c0d60c5f08321f7119d243cb8f22764 100644
--- a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
+++ b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
@@ -601,16 +601,14 @@ class TestTypeProvider implements TypeProvider {
List<DartType> typeArguments =
TypeParameterTypeImpl.getTypes(classElement.typeParameters);
for (PropertyAccessorElement accessor in classElement.accessors) {
- FunctionTypeImpl functionType = accessor.type as FunctionTypeImpl;
- functionType.typeArguments = typeArguments;
+ (accessor as ExecutableElementImpl).type = new FunctionTypeImpl(accessor);
}
for (MethodElement method in classElement.methods) {
- FunctionTypeImpl functionType = method.type as FunctionTypeImpl;
- functionType.typeArguments = typeArguments;
+ (method as ExecutableElementImpl).type = new FunctionTypeImpl(method);
}
for (ConstructorElement constructor in classElement.constructors) {
- FunctionTypeImpl functionType = constructor.type as FunctionTypeImpl;
- functionType.typeArguments = typeArguments;
+ (constructor as ExecutableElementImpl).type =
+ new FunctionTypeImpl(constructor);
}
}

Powered by Google App Engine
This is Rietveld 408576698