compiler: Don't lower binary expressions with mismatched types.

From-SVN: r184352
This commit is contained in:
Ian Lance Taylor 2012-02-17 21:51:10 +00:00
parent f7b675752a
commit 0a9115099d

View File

@ -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)
{