File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Rubberduck.Inspections/Concrete Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,12 @@ public void ClearContexts()
48
48
49
49
public override void ExitIfStmt ( VBAParser . IfStmtContext context )
50
50
{
51
- if ( context . elseIfBlock ( ) . Any ( ) )
51
+ if ( context . elseIfBlock ( ) != null && context . elseIfBlock ( ) . Any ( ) )
52
+ {
53
+ return ;
54
+ }
55
+
56
+ if ( context . elseBlock ( ) == null )
52
57
{
53
58
return ;
54
59
}
@@ -60,6 +65,7 @@ public override void ExitIfStmt(VBAParser.IfStmtContext context)
60
65
}
61
66
62
67
// make sure the assignments are the opposite
68
+
63
69
if ( ! ( ParserRuleContextHelper . GetDescendent < VBAParser . BooleanLiteralIdentifierContext > ( context . block ( ) ) . GetText ( ) == Tokens . True ^
64
70
ParserRuleContextHelper . GetDescendent < VBAParser . BooleanLiteralIdentifierContext > ( context . elseBlock ( ) . block ( ) ) . GetText ( ) == Tokens . True ) )
65
71
{
You can’t perform that action at this time.
0 commit comments