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

Unified Diff: pkg/analyzer/test/src/dart/ast/utilities_test.dart

Issue 1970053002: Update ResolutionCopier to copy TypeArgumentList of invocations. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « pkg/analyzer/lib/src/dart/ast/utilities.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/dart/ast/utilities_test.dart
diff --git a/pkg/analyzer/test/src/dart/ast/utilities_test.dart b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
index ce4b4994d2a1eb505363cd59cf67cd8c38e7f873..6653c2095fc19819b994ad5dd3c1bcdae97a8bb0 100644
--- a/pkg/analyzer/test/src/dart/ast/utilities_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
@@ -664,6 +664,11 @@ class ResolutionCopierTest extends EngineTestCase {
fromNode.staticElement = staticElement;
FunctionExpressionInvocation toNode =
AstFactory.functionExpressionInvocation(AstFactory.identifier3("f"));
+ ClassElement elementT = ElementFactory.classElement2('T');
+ fromNode.typeArguments =
+ AstFactory.typeArgumentList(<TypeName>[AstFactory.typeName(elementT)]);
+ toNode.typeArguments =
+ AstFactory.typeArgumentList(<TypeName>[AstFactory.typeName4('T')]);
_copyAndVerifyInvocation(fromNode, toNode);
@@ -791,6 +796,11 @@ class ResolutionCopierTest extends EngineTestCase {
void test_visitMethodInvocation() {
MethodInvocation fromNode = AstFactory.methodInvocation2("m");
MethodInvocation toNode = AstFactory.methodInvocation2("m");
+ ClassElement elementT = ElementFactory.classElement2('T');
+ fromNode.typeArguments =
+ AstFactory.typeArgumentList(<TypeName>[AstFactory.typeName(elementT)]);
+ toNode.typeArguments =
+ AstFactory.typeArgumentList(<TypeName>[AstFactory.typeName4('T')]);
_copyAndVerifyInvocation(fromNode, toNode);
}
@@ -1086,6 +1096,15 @@ class ResolutionCopierTest extends EngineTestCase {
expect(toNode.staticType, same(staticType));
expect(toNode.propagatedInvokeType, same(propagatedInvokeType));
expect(toNode.staticInvokeType, same(staticInvokeType));
+ List<TypeName> fromTypeArguments = toNode.typeArguments.arguments;
+ List<TypeName> toTypeArguments = fromNode.typeArguments.arguments;
+ if (fromTypeArguments != null) {
+ for (int i = 0; i < fromTypeArguments.length; i++) {
+ TypeName toArgument = fromTypeArguments[i];
+ TypeName fromArgument = toTypeArguments[i];
+ expect(toArgument.type, same(fromArgument.type));
+ }
+ }
}
}
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/utilities.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698