Skip to content

Commit 7d977d5

Browse files
committed
Update constant declaration retrieval
1 parent e81decf commit 7d977d5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitlyTypedConstInspection.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ protected override IEnumerable<IInspectionResult> DoGetInspectionResults()
1818
{
1919
var declarationFinder = State.DeclarationFinder;
2020

21-
var implicitlyTypedConsts = declarationFinder.AllDeclarations
22-
.Where(declaration => declaration.DeclarationType == DeclarationType.Constant
23-
&& !declaration.IsTypeSpecified);
21+
var implicitlyTypedConsts = declarationFinder.UserDeclarations(DeclarationType.Constant)
22+
.Where(declaration => !declaration.IsTypeSpecified);
2423

2524
return implicitlyTypedConsts.Select(Result);
2625
}

0 commit comments

Comments
 (0)