Skip to content

Commit 9094707

Browse files
Hosch250retailcoder
authored andcommitted
Close #1574 (#1577)
1 parent ace1ea1 commit 9094707

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

RetailCoder.VBE/Inspections/UntypedFunctionUsageInspection.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,13 @@ public UntypedFunctionUsageInspection(RubberduckParserState state)
4343
public override IEnumerable<InspectionResultBase> GetInspectionResults()
4444
{
4545
var declarations = BuiltInDeclarations
46-
// note: these *should* be functions, but somehow they're not defined as such
47-
.Where(item => _tokens.Any(token => (item.IdentifierName == token || item.IdentifierName == "_B_var_" + token)) && item.References.Any());
46+
// note: these *should* be functions, but somehow they're not defined as such
47+
.Where(item =>
48+
_tokens.Any(token => item.IdentifierName == token || item.IdentifierName == "_B_var_" + token) &&
49+
item.References.Any(reference => _tokens.Contains(reference.IdentifierName)));
4850

4951
return declarations.SelectMany(declaration => declaration.References
52+
.Where(item => _tokens.Contains(item.IdentifierName))
5053
.Select(item => new UntypedFunctionUsageInspectionResult(this, item)));
5154
}
5255
}

0 commit comments

Comments
 (0)