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

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

Issue 673673002: Record types of invoked variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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:
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/element.dart ('k') | pkg/analyzer/test/generated/resolver_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/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 32d659cd1c319faa4d7f1b9ff1c6e971bff523b0..1717d76b54f8d928a70d76aad5da0f29afa30e1d 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -3851,7 +3851,7 @@ class ElementBuilder extends RecursiveAstVisitor<Object> {
SimpleIdentifier aliasName = node.name;
List<ParameterElement> parameters = holder.parameters;
List<TypeParameterElement> typeParameters = holder.typeParameters;
- FunctionTypeAliasElementImpl element = new FunctionTypeAliasElementImpl(aliasName);
+ FunctionTypeAliasElementImpl element = new FunctionTypeAliasElementImpl.forNode(aliasName);
element.parameters = parameters;
element.typeParameters = typeParameters;
FunctionTypeImpl type = new FunctionTypeImpl.con2(element);
@@ -21740,9 +21740,9 @@ class StaticTypeAnalyzer extends SimpleAstVisitor<Object> {
Object visitMethodInvocation(MethodInvocation node) {
SimpleIdentifier methodNameNode = node.methodName;
Element staticMethodElement = methodNameNode.staticElement;
- // Record types of the local variable invoked as a function.
- if (staticMethodElement is LocalVariableElement) {
- LocalVariableElement variable = staticMethodElement;
+ // Record types of the variable invoked as a function.
+ if (staticMethodElement is VariableElement) {
+ VariableElement variable = staticMethodElement;
DartType staticType = variable.type;
_recordStaticType(methodNameNode, staticType);
DartType propagatedType = _overrideManager.getType(variable);
@@ -24801,7 +24801,7 @@ class TypeResolverVisitor extends ScopedVisitor {
*/
void _setFunctionTypedParameterType(ParameterElementImpl element, TypeName returnType, FormalParameterList parameterList) {
List<ParameterElement> parameters = _getElements(parameterList);
- FunctionTypeAliasElementImpl aliasElement = new FunctionTypeAliasElementImpl(null);
+ FunctionTypeAliasElementImpl aliasElement = new FunctionTypeAliasElementImpl.forNode(null);
aliasElement.synthetic = true;
aliasElement.shareParameters(parameters);
aliasElement.returnType = _computeReturnType(returnType);
« no previous file with comments | « pkg/analyzer/lib/src/generated/element.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698