Skip to content

Commit a47c49b

Browse files
committed
return immediately if Set keyword is already present
1 parent 5edd560 commit a47c49b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Rubberduck.Inspections/VariableRequiresSetAssignmentEvaluator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static IEnumerable<Declaration> GetDeclarationsPotentiallyRequiringSetAss
2828
public static bool NeedsSetKeywordAdded(IdentifierReference reference, RubberduckParserState state)
2929
{
3030
var setStmtContext = reference.Context.GetAncestor<VBAParser.SetStmtContext>();
31-
return RequiresSetAssignment(reference, state) && setStmtContext == null;
31+
return setStmtContext == null && RequiresSetAssignment(reference, state);
3232
}
3333

3434
/// <summary>

0 commit comments

Comments
 (0)