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

Unified Diff: pkg/analyzer/lib/src/summary/resynthesize.dart

Issue 2028713003: Fix AST-based type inference with explicit type parameters for method calls. (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
Index: pkg/analyzer/lib/src/summary/resynthesize.dart
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
index 19eaa8235ca39493e0a3bc79a6d9ca7b81fc8c98..a10840fbfe7b32c7d8379f409fd3d052260b4d52 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -674,12 +674,21 @@ class _ConstExprBuilder {
EntityRef ref = uc.references[refPtr++];
_ReferenceInfo info = resynthesizer.getReferenceInfo(ref.reference);
Expression node = _buildIdentifierSequence(info);
+ TypeArgumentList typeArguments;
+ int numTypeArguments = uc.ints[intPtr++];
+ if (numTypeArguments > 0) {
+ List<TypeName> typeNames = new List<TypeName>(numTypeArguments);
+ for (int i = 0; i < numTypeArguments; i++) {
+ typeNames[i] = _newTypeName();
+ }
+ typeArguments = AstFactory.typeArgumentList(typeNames);
+ }
if (node is SimpleIdentifier) {
_push(new MethodInvocation(
null,
TokenFactory.tokenFromType(TokenType.PERIOD),
node,
- null,
+ typeArguments,
AstFactory.argumentList(arguments)));
} else {
throw new UnimplementedError('For ${node?.runtimeType}: $node');

Powered by Google App Engine
This is Rietveld 408576698