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
This commit is contained in:
parent
2310e4504d
commit
552ab9772f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user