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

Unified Diff: pkg/analyzer/test/src/task/strong/front_end_inference_test.dart

Issue 2866363004: Fix annotation of generic method invocations in Fasta inference tests (again). (Closed)
Patch Set: Created 3 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 | « no previous file | pkg/front_end/testcases/inference/downwards_inference_on_function_of_t_using_the_t.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/strong/front_end_inference_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/front_end_inference_test.dart b/pkg/analyzer/test/src/task/strong/front_end_inference_test.dart
index 9013322fc8352437c39ff1a5fe4cfb35cb5f0244..55be398a41c848fbaa69a66ec9c1d4ee53d2eba4 100644
--- a/pkg/analyzer/test/src/task/strong/front_end_inference_test.dart
+++ b/pkg/analyzer/test/src/task/strong/front_end_inference_test.dart
@@ -275,11 +275,15 @@ class _InstrumentationVisitor extends RecursiveAstVisitor<Null> {
visitMethodInvocation(MethodInvocation node) {
super.visitMethodInvocation(node);
- var inferredTypeArguments = _getInferredFunctionTypeArguments(
- node.function.staticType, node.staticInvokeType, node.typeArguments)
- .toList();
- if (inferredTypeArguments.isNotEmpty) {
- _recordTypeArguments(node.methodName.offset, inferredTypeArguments);
+ if (node.typeArguments == null) {
+ var inferredTypeArguments = _getInferredFunctionTypeArguments(
+ node.function.staticType,
+ node.staticInvokeType,
+ node.typeArguments)
+ .toList();
+ if (inferredTypeArguments.isNotEmpty) {
+ _recordTypeArguments(node.methodName.offset, inferredTypeArguments);
+ }
}
}
« no previous file with comments | « no previous file | pkg/front_end/testcases/inference/downwards_inference_on_function_of_t_using_the_t.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698