File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Rubberduck.Parsing/VBA/DeclarationCaching Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -552,8 +552,10 @@ public ParameterDeclaration FindParameterFromArgument(VBAParser.ArgumentExpressi
552
552
}
553
553
554
554
var procedure = MatchName ( procedureName )
555
- . Where ( p => AccessibilityCheck . IsAccessible ( enclosingProcedure , p ) )
556
- . SingleOrDefault ( p => ! p . DeclarationType . HasFlag ( DeclarationType . Property ) || p . DeclarationType . HasFlag ( DeclarationType . PropertyGet ) ) ;
555
+ . SingleOrDefault ( p =>
556
+ ( ! p . DeclarationType . HasFlag ( DeclarationType . Property ) ||
557
+ p . DeclarationType . HasFlag ( DeclarationType . PropertyGet ) ) &&
558
+ p . References . Any ( r => callStmt == r . Context . GetAncestor < VBAParser . CallStmtContext > ( ) ) ) ;
557
559
if ( procedure ? . ParentScopeDeclaration is ClassModuleDeclaration )
558
560
{
559
561
// we can't know that the member is on the class' default interface
You can’t perform that action at this time.
0 commit comments