compiler: Don't lower binary expressions with mismatched types.
From-SVN: r184352
This commit is contained in:
parent
f7b675752a
commit
0a9115099d
@ -5564,6 +5564,7 @@ Binary_expression::do_lower(Gogo* gogo, Named_object*,
|
||||
&& op != OPERATOR_RSHIFT)
|
||||
{
|
||||
// May be a type error--let it be diagnosed later.
|
||||
return this;
|
||||
}
|
||||
else if (is_comparison)
|
||||
{
|
||||
@ -5667,6 +5668,7 @@ Binary_expression::do_lower(Gogo* gogo, Named_object*,
|
||||
&& op != OPERATOR_RSHIFT)
|
||||
{
|
||||
// May be a type error--let it be diagnosed later.
|
||||
return this;
|
||||
}
|
||||
else if (is_comparison)
|
||||
{
|
||||
@ -5750,6 +5752,7 @@ Binary_expression::do_lower(Gogo* gogo, Named_object*,
|
||||
&& left_type->base() != right_type->base())
|
||||
{
|
||||
// May be a type error--let it be diagnosed later.
|
||||
return this;
|
||||
}
|
||||
else if (op == OPERATOR_EQEQ || op == OPERATOR_NOTEQ)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user