Skip to content

Commit

Permalink
Fix cast
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackerpilot committed Oct 18, 2016
1 parent cb70ded commit bf3b942
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/analysis/ifelsesame.d
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ class IfElseSameCheck : BaseAnalyzer

override void visit(const AssignExpression assignExpression)
{
auto e = cast(const AssignExpression)(cast(const Expression) assignExpression.expression)
.items[$ - 1];
auto e = cast(const AssignExpression) assignExpression.expression;
if (e !is null && assignExpression.operator == tok!"="
&& e.ternaryExpression == assignExpression.ternaryExpression)
{
Expand Down

0 comments on commit bf3b942

Please sign in to comment.