Skip to content

Commit eff5462

Browse files
committed
Fix further indirect conflicts from merge
- DeclarationInspectionBase - FunctionReturnValueDiscardedInspection - ImplicitlyTypedConstInspection
1 parent d154989 commit eff5462

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Rubberduck.CodeAnalysis/Inspections/Abstract/DeclarationInspectionBase.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ namespace Rubberduck.Inspections.Abstract
1010
{
1111
public abstract class DeclarationInspectionBase : InspectionBase
1212
{
13-
protected readonly IDeclarationFinderProvider DeclarationFinderProvider;
1413
protected readonly DeclarationType[] RelevantDeclarationTypes;
1514

1615
protected DeclarationInspectionBase(RubberduckParserState state, params DeclarationType[] relevantDeclarationTypes)
1716
: base(state)
1817
{
19-
DeclarationFinderProvider = state;
2018
RelevantDeclarationTypes = relevantDeclarationTypes;
2119
}
2220

Rubberduck.CodeAnalysis/Inspections/Concrete/FunctionReturnValueDiscardedInspection.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using Rubberduck.Resources.Inspections;
77
using Rubberduck.Parsing.Symbols;
88
using Rubberduck.Parsing.VBA;
9+
using Rubberduck.Parsing.VBA.DeclarationCaching;
910

1011
namespace Rubberduck.Inspections.Concrete
1112
{
@@ -46,7 +47,7 @@ public FunctionReturnValueDiscardedInspection(RubberduckParserState state)
4647
Severity = CodeInspectionSeverity.Suggestion;
4748
}
4849

49-
protected override bool IsResultReference(IdentifierReference reference)
50+
protected override bool IsResultReference(IdentifierReference reference, DeclarationFinder finder)
5051
{
5152
return reference?.Declaration != null
5253
&& !reference.IsAssignment
@@ -85,7 +86,7 @@ private static bool IsCalledAsProcedure(ParserRuleContext context)
8586
return true;
8687
}
8788

88-
protected override string ResultDescription(IdentifierReference reference)
89+
protected override string ResultDescription(IdentifierReference reference, dynamic properties = null)
8990
{
9091
var functionName = reference.Declaration.QualifiedName.ToString();
9192
return string.Format(InspectionResults.FunctionReturnValueDiscardedInspection, functionName);

Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitlyTypedConstInspection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public ImplicitlyTypedConstInspection(RubberduckParserState state)
1616

1717
protected override IEnumerable<IInspectionResult> DoGetInspectionResults()
1818
{
19-
var declarationFinder = State.DeclarationFinder;
19+
var declarationFinder = DeclarationFinderProvider.DeclarationFinder;
2020

2121
var implicitlyTypedConsts = declarationFinder.UserDeclarations(DeclarationType.Constant)
2222
.Where(declaration => !declaration.IsTypeSpecified);

0 commit comments

Comments
 (0)