Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/pigeon/lib/pigeon_lib.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,9 @@ class _RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
final dart_ast.NamedType? namedType =
getFirstChildOfType<dart_ast.NamedType>(parameter);
if (namedType != null) {
// TODO(stuartmorgan): Replace `name` when adopting the next version of
// analyzer.
// ignore: deprecated_member_use
final String argTypeBaseName = namedType.name.name;
final bool isNullable = namedType.question != null;
final List<TypeDeclaration> argTypeArguments =
Expand Down Expand Up @@ -1086,6 +1089,9 @@ class _RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
Method(
name: node.name.lexeme,
returnType: TypeDeclaration(
// TODO(stuartmorgan): Replace `name` when adopting the next
// version of analyzer.
// ignore: deprecated_member_use
baseName: returnType.name.name,
typeArguments:
typeAnnotationsToTypeArguments(returnType.typeArguments),
Expand Down Expand Up @@ -1135,6 +1141,9 @@ class _RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
for (final Object x in typeArguments.childEntities) {
if (x is dart_ast.NamedType) {
result.add(TypeDeclaration(
// TODO(stuartmorgan): Replace `name` when adopting the next
// version of analyzer.
// ignore: deprecated_member_use
baseName: x.name.name,
isNullable: x.question != null,
typeArguments: typeAnnotationsToTypeArguments(x.typeArguments)));
Expand Down Expand Up @@ -1165,6 +1174,9 @@ class _RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
final dart_ast.TypeArgumentList? typeArguments = type.typeArguments;
_currentClass!.fields.add(NamedType(
type: TypeDeclaration(
// TODO(stuartmorgan): Replace `name` when adopting the next
// version of analyzer.
// ignore: deprecated_member_use
baseName: type.name.name,
isNullable: type.question != null,
typeArguments: typeAnnotationsToTypeArguments(typeArguments),
Expand Down