Skip to content

Commit 0ebb990

Browse files
committed
Simplify
1 parent 182e0a7 commit 0ebb990

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1648InheritDocMustBeUsedWithInheritingClass.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ private static void HandleMemberDeclaration(SyntaxNodeAnalysisContext context)
150150

151151
if (memberSyntax is ConstructorDeclarationSyntax constructorDeclarationSyntax && declaredSymbol is IMethodSymbol constructorMethodSymbol)
152152
{
153-
if (constructorMethodSymbol.ContainingType is INamedTypeSymbol enclosingNamedTypeSymbol)
153+
if (constructorMethodSymbol.ContainingType != null)
154154
{
155-
INamedTypeSymbol baseType = enclosingNamedTypeSymbol.BaseType;
155+
INamedTypeSymbol baseType = constructorMethodSymbol.ContainingType.BaseType;
156156

157157
if (baseType.SpecialType == SpecialType.System_Object)
158158
{

0 commit comments

Comments
 (0)