Skip to content

Commit

Permalink
Merge pull request Cysharp#164 from honda-tatsuya/fix-codegenerator
Browse files Browse the repository at this point in the history
fix: DynamicArgumentTuple is not registered when return type is embedded array type.
  • Loading branch information
neuecc authored Jul 1, 2019
2 parents bb21083 + 5a4a1b7 commit b9feb29
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/MagicOnion.UniversalCodeGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,13 @@ static void ExtractResolverInfo(InterfaceDefinition[] definitions, out GenericSe
if (method.UnwrappedOriginalResposneTypeSymbol.TypeKind == Microsoft.CodeAnalysis.TypeKind.Array)
{
var array = method.UnwrappedOriginalResposneTypeSymbol as IArrayTypeSymbol;
if (embeddedTypes.Contains(array.ToString())) continue;
MakeArray(array, genericInfos);
if (array.ElementType.TypeKind == TypeKind.Enum)
if (!embeddedTypes.Contains(array.ToString()))
{
MakeEnum(array.ElementType as INamedTypeSymbol, enumInfos);
MakeArray(array, genericInfos);
if (array.ElementType.TypeKind == TypeKind.Enum)
{
MakeEnum(array.ElementType as INamedTypeSymbol, enumInfos);
}
}
}
else if (method.UnwrappedOriginalResposneTypeSymbol.TypeKind == Microsoft.CodeAnalysis.TypeKind.Enum)
Expand Down

0 comments on commit b9feb29

Please sign in to comment.