Skip to content

Commit

Permalink
fix: DynamicArgumentTuple is not registered when return type is embed…
Browse files Browse the repository at this point in the history
…ded array type.
  • Loading branch information
honda-tatsuya committed Jul 1, 2019
1 parent 5666261 commit 58f7ab1
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 58f7ab1

Please sign in to comment.