PR other/59545
compiler: Fix bogus invalid static_cast to Unary_expression.
From-SVN: r208888
go_assert(!this->expr_->is_composite_literal()
|| this->expr_->is_immutable());
- Unary_expression* ue = static_cast<Unary_expression*>(this->expr_);
- go_assert(ue == NULL || ue->op() != OPERATOR_AND);
+ if (this->expr_->classification() == EXPRESSION_UNARY)
+ {
+ Unary_expression* ue =
+ static_cast<Unary_expression*>(this->expr_);
+ go_assert(ue->op() != OPERATOR_AND);
+ }
}
// Build a decl for a constant constructor.