diff --git a/ChangeLog.md b/ChangeLog.md index 07a4855a4d..17087977aa 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fix analyzer [RCS1090](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1090) ([PR](https://github.com/dotnet/roslynator/pull/1566)) -- [CLI] Fix command `generate-doc` ([PR](https://github.com/dotnet/roslynator/pull/1568)) +- [CLI] Fix command `generate-doc` ([PR](https://github.com/dotnet/roslynator/pull/1568), [PR](https://github.com/dotnet/roslynator/pull/1570)) ### Change diff --git a/src/Documentation/DocumentationWriter.cs b/src/Documentation/DocumentationWriter.cs index cb46e37d01..4c76aec13c 100644 --- a/src/Documentation/DocumentationWriter.cs +++ b/src/Documentation/DocumentationWriter.cs @@ -1530,7 +1530,7 @@ void WriteConstantValue(IFieldSymbol fieldSymbol) if (fieldSymbol.Type.TypeKind == TypeKind.Enum) { - OneOrMany.Enumerator en = EnumUtility.GetConstituentFields(fieldSymbol.ConstantValue, fieldSymbol.ContainingType).GetEnumerator(); + OneOrMany.Enumerator en = EnumUtility.GetConstituentFields(fieldSymbol.ConstantValue, (INamedTypeSymbol)fieldSymbol.Type).GetEnumerator(); if (en.MoveNext()) {