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

Unified Diff: pkg/analyzer/lib/src/generated/element_resolver.dart

Issue 1606043003: remove unused method in ElementResolver (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/element_resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart
index f1de6331de671e02f4e51fc667afc3660080b780..5bf9630c478713255f3dd5352f2dad8381eb9f35 100644
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart
@@ -1355,49 +1355,6 @@ class ElementResolver extends SimpleAstVisitor<Object> {
return null;
}
- DartType _computeMethodInvokeType(MethodInvocation node, Element element) {
- if (element == null) {
- return null;
- }
-
- DartType invokeType;
- if (element is PropertyAccessorElement) {
- invokeType = element.returnType;
- } else if (element is ExecutableElement) {
- invokeType = element.type;
- } else if (element is VariableElement) {
- invokeType = _promoteManager.getStaticType(element);
- }
-
- //
- // Check for a generic method & apply type arguments if any were passed.
- //
- // TODO(jmesserly): support generic "call" methods on InterfaceType.
- if (invokeType is FunctionType) {
- FunctionType type = invokeType;
- List<TypeParameterElement> parameters = type.typeFormals;
-
- NodeList<TypeName> arguments = node.typeArguments?.arguments;
- if (arguments != null && arguments.length != parameters.length) {
- // Wrong number of type arguments. Ignore them
- arguments = null;
- _resolver.reportErrorForNode(
- StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS,
- node.methodName,
- [type, parameters.length, arguments?.length ?? 0]);
- }
- if (parameters.isNotEmpty) {
- if (arguments == null) {
- invokeType = _resolver.typeSystem.instantiateToBounds(type);
- } else {
- invokeType = type.instantiate(arguments.map((n) => n.type).toList());
- }
- }
- }
-
- return invokeType;
- }
-
/**
* If the given [element] is a setter, return the getter associated with it.
* Otherwise, return the element unchanged.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698