Prevent false positive in slice error

This commit is contained in:
Hackerpilot 2014-05-26 01:24:04 +00:00
parent d8f4ed2307
commit 06f9891b62
1 changed files with 8 additions and 0 deletions

View File

@ -56,6 +56,14 @@ class BackwardsRangeCheck : BaseAnalyzer
foreachStatement.accept(this);
}
override void visit(const AddExpression add)
{
auto s = state;
state = State.ignore;
add.accept(this);
state = s;
}
override void visit(const UnaryExpression unary)
{
if (state != State.ignore && unary.primaryExpression is null)