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

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

Issue 2622303006: Reapply "Add support for generic function type syntax, part 1" (Closed)
Patch Set: Created 3 years, 11 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 aefe990f5b559fd372ea37224b23d2ffe4958fe0..73f6b8a55351fcf1ded510ccae69f05e0d0ff801 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -477,17 +477,18 @@ class _ConstExprBuilder {
_pushList(null);
break;
case UnlinkedExprOperation.makeTypedList:
- TypeName itemType = _newTypeName();
- _pushList(AstTestFactory.typeArgumentList(<TypeName>[itemType]));
+ TypeAnnotation itemType = _newTypeName();
+ _pushList(
+ AstTestFactory.typeArgumentList(<TypeAnnotation>[itemType]));
break;
case UnlinkedExprOperation.makeUntypedMap:
_pushMap(null);
break;
case UnlinkedExprOperation.makeTypedMap:
- TypeName keyType = _newTypeName();
- TypeName valueType = _newTypeName();
- _pushMap(
- AstTestFactory.typeArgumentList(<TypeName>[keyType, valueType]));
+ TypeAnnotation keyType = _newTypeName();
+ TypeAnnotation valueType = _newTypeName();
+ _pushMap(AstTestFactory
+ .typeArgumentList(<TypeAnnotation>[keyType, valueType]));
break;
case UnlinkedExprOperation.pushReference:
_pushReference();
@@ -579,8 +580,8 @@ class _ConstExprBuilder {
return AstTestFactory.propertyAccess(enclosing, property);
}
- TypeName _buildTypeAst(DartType type) {
- List<TypeName> argumentNodes;
+ TypeAnnotation _buildTypeAst(DartType type) {
+ List<TypeAnnotation> argumentNodes;
if (type is ParameterizedType) {
if (!resynthesizer.libraryResynthesizer.typesWithImplicitTypeArguments
.contains(type)) {
@@ -614,7 +615,7 @@ class _ConstExprBuilder {
* Convert the next reference to the [DartType] and return the AST
* corresponding to this type.
*/
- TypeName _newTypeName() {
+ TypeAnnotation _newTypeName() {
EntityRef typeRef = uc.references[refPtr++];
DartType type =
resynthesizer.buildType(typeRef, context?.typeParameterContext);
@@ -724,7 +725,8 @@ class _ConstExprBuilder {
TypeArgumentList typeArguments;
int numTypeArguments = uc.ints[intPtr++];
if (numTypeArguments > 0) {
- List<TypeName> typeNames = new List<TypeName>(numTypeArguments);
+ List<TypeAnnotation> typeNames =
+ new List<TypeAnnotation>(numTypeArguments);
for (int i = 0; i < numTypeArguments; i++) {
typeNames[i] = _newTypeName();
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart ('k') | pkg/analyzer/lib/src/summary/summarize_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698