Index: pkg/analyzer/test/generated/parser_test.dart |
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart |
index 710be9b836ef5c5038ab7409b5f95b6b923ec6ed..78a1f38c5063f986557b7d0799846b09b5080aae 100644 |
--- a/pkg/analyzer/test/generated/parser_test.dart |
+++ b/pkg/analyzer/test/generated/parser_test.dart |
@@ -4429,20 +4429,16 @@ class ResolutionCopierTest extends EngineTestCase { |
MethodElement propagatedElement = ElementFactory.methodElement( |
"m", ElementFactory.classElement2("C").type); |
fromNode.propagatedElement = propagatedElement; |
- DartType propagatedType = ElementFactory.classElement2("C").type; |
- fromNode.propagatedType = propagatedType; |
MethodElement staticElement = ElementFactory.methodElement( |
"m", ElementFactory.classElement2("C").type); |
fromNode.staticElement = staticElement; |
- DartType staticType = ElementFactory.classElement2("C").type; |
- fromNode.staticType = staticType; |
FunctionExpressionInvocation toNode = |
AstFactory.functionExpressionInvocation(AstFactory.identifier3("f")); |
- ResolutionCopier.copyResolutionData(fromNode, toNode); |
+ |
+ _copyAndVerifyInvocation(fromNode, toNode); |
+ |
expect(toNode.propagatedElement, same(propagatedElement)); |
- expect(toNode.propagatedType, same(propagatedType)); |
expect(toNode.staticElement, same(staticElement)); |
- expect(toNode.staticType, same(staticType)); |
} |
void test_visitImportDirective() { |
@@ -4564,14 +4560,8 @@ class ResolutionCopierTest extends EngineTestCase { |
void test_visitMethodInvocation() { |
MethodInvocation fromNode = AstFactory.methodInvocation2("m"); |
- DartType propagatedType = ElementFactory.classElement2("C").type; |
- fromNode.propagatedType = propagatedType; |
- DartType staticType = ElementFactory.classElement2("C").type; |
- fromNode.staticType = staticType; |
MethodInvocation toNode = AstFactory.methodInvocation2("m"); |
- ResolutionCopier.copyResolutionData(fromNode, toNode); |
- expect(toNode.propagatedType, same(propagatedType)); |
- expect(toNode.staticType, same(staticType)); |
+ _copyAndVerifyInvocation(fromNode, toNode); |
} |
void test_visitNamedExpression() { |
@@ -4848,6 +4838,25 @@ class ResolutionCopierTest extends EngineTestCase { |
ResolutionCopier.copyResolutionData(fromNode, toNode); |
expect(toNode.type, same(type)); |
} |
+ |
+ void _copyAndVerifyInvocation( |
+ InvocationExpression fromNode, InvocationExpression toNode) { |
+ DartType propagatedType = ElementFactory.classElement2("C").type; |
+ fromNode.propagatedType = propagatedType; |
+ DartType staticType = ElementFactory.classElement2("C").type; |
+ fromNode.staticType = staticType; |
+ |
+ DartType propagatedInvokeType = ElementFactory.classElement2("C").type; |
+ fromNode.propagatedInvokeType = propagatedInvokeType; |
+ DartType staticInvokeType = ElementFactory.classElement2("C").type; |
+ fromNode.staticInvokeType = staticInvokeType; |
+ |
+ ResolutionCopier.copyResolutionData(fromNode, toNode); |
+ expect(toNode.propagatedType, same(propagatedType)); |
+ expect(toNode.staticType, same(staticType)); |
+ expect(toNode.propagatedInvokeType, same(propagatedInvokeType)); |
+ expect(toNode.staticInvokeType, same(staticInvokeType)); |
+ } |
} |
/** |