File tree Expand file tree Collapse file tree
src/ImmutableObjectGraph.Generation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -883,7 +883,25 @@ private static bool HasAttribute<T>(INamedTypeSymbol type)
883883
884884 private static NameSyntax GetFullyQualifiedSymbolName ( INamespaceOrTypeSymbol symbol )
885885 {
886- if ( symbol == null || string . IsNullOrEmpty ( symbol . Name ) )
886+ if ( symbol == null )
887+ {
888+ return null ;
889+ }
890+
891+ if ( symbol . Kind == SymbolKind . ArrayType )
892+ {
893+ var arraySymbol = ( IArrayTypeSymbol ) symbol ;
894+ var elementType = GetFullyQualifiedSymbolName ( arraySymbol . ElementType ) ;
895+
896+ // I don't know how to create a NameSyntax with an array inside it,
897+ // so use ParseName as an escape hatch.
898+ ////return SyntaxFactory.ArrayType(elementType)
899+ //// .AddRankSpecifiers(SyntaxFactory.ArrayRankSpecifier()
900+ //// .AddSizes(SyntaxFactory.OmittedArraySizeExpression()));
901+ return SyntaxFactory . ParseName ( elementType . ToString ( ) + "[]" ) ;
902+ }
903+
904+ if ( string . IsNullOrEmpty ( symbol . Name ) )
887905 {
888906 return null ;
889907 }
You can’t perform that action at this time.
0 commit comments