Skip to content

Commit 56cd0f8

Browse files
committed
Changed Debug.Assert killing the inspection in presence of annotation into a conditional return false
1 parent 4241494 commit 56cd0f8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Rubberduck.Parsing/VBA/Attributes.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ public class Attributes : HashSet<AttributeNode>
8080
{
8181
public bool HasAttributeFor(AnnotationType annotationType, string memberName = null)
8282
{
83-
Debug.Assert(annotationType.HasFlag(AnnotationType.Attribute));
83+
if (!annotationType.HasFlag(AnnotationType.Attribute))
84+
{
85+
return false;
86+
}
87+
8488
var name = "VB_" + annotationType;
8589

8690
if (annotationType.HasFlag(AnnotationType.MemberAnnotation))

0 commit comments

Comments
 (0)