File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1071,15 +1071,14 @@ class _RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
1071
1071
if (_currentApi != null ) {
1072
1072
// Methods without named return types aren't supported.
1073
1073
final dart_ast.TypeAnnotation returnType = node.returnType! ;
1074
- final dart_ast.SimpleIdentifier returnTypeIdentifier =
1075
- getFirstChildOfType< dart_ast.SimpleIdentifier > (returnType)! ;
1074
+ returnType as dart_ast.NamedType ;
1076
1075
_currentApi! .methods.add (
1077
1076
Method (
1078
1077
name: node.name.lexeme,
1079
1078
returnType: TypeDeclaration (
1080
- baseName: returnTypeIdentifier .name,
1081
- typeArguments: typeAnnotationsToTypeArguments (
1082
- (returnType as dart_ast. NamedType ) .typeArguments),
1079
+ baseName: returnType.name .name,
1080
+ typeArguments:
1081
+ typeAnnotationsToTypeArguments (returnType.typeArguments),
1083
1082
isNullable: returnType.question != null ),
1084
1083
arguments: arguments,
1085
1084
isAsynchronous: isAsynchronous,
You can’t perform that action at this time.
0 commit comments