bool ExpressionResolver::convert_to_element(RefPtr<Expression> &expr, BasicTypeDeclaration &elem_type)
{
- if(BasicTypeDeclaration *expr_type = dynamic_cast<BasicTypeDeclaration *>(expr->type))
+ if(BasicTypeDeclaration *expr_basic = dynamic_cast<BasicTypeDeclaration *>(expr->type))
{
BasicTypeDeclaration *to_type = &elem_type;
- if(is_vector_or_matrix(*expr_type))
- to_type = find_type(elem_type, expr_type->kind, expr_type->size);
+ if(is_vector_or_matrix(*expr_basic))
+ to_type = find_type(elem_type, expr_basic->kind, expr_basic->size);
if(to_type)
{
convert_to(expr, *to_type);