Commit 552ab977 by Ian Lance Taylor

compiler: fix crashes.

The compiler would crash on:
        if true || x, y := 1, 2 {}
and
        var s string
        s = append(s, "hello")

Reported in issue 3186.

From-SVN: r185928
parent 2310e450
......@@ -7441,6 +7441,8 @@ Builtin_call_expression::check_one_arg()
void
Builtin_call_expression::do_check_types(Gogo*)
{
if (this->is_error_expression())
return;
switch (this->code_)
{
case BUILTIN_INVALID:
......
......@@ -3971,7 +3971,7 @@ Parse::if_stat()
bool saw_simple_stat = false;
Expression* cond = NULL;
bool saw_send_stmt;
bool saw_send_stmt = false;
if (this->simple_stat_may_start_here())
{
cond = this->simple_stat(false, &saw_send_stmt, NULL, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment