compiler: fix method finalization of unnamed structs.
Used to trigger an ICE on var v struct{I}; type I interface{} Updates issue 7. From-SVN: r185932
This commit is contained in:
parent
63135179e4
commit
ad57e71d44
|
@ -1653,8 +1653,12 @@ Finalize_methods::type(Type* t)
|
|||
}
|
||||
|
||||
case Type::TYPE_STRUCT:
|
||||
// Traverse the field types first in case there is an embedded
|
||||
// field with methods that the struct should inherit.
|
||||
if (t->struct_type()->traverse_field_types(this) == TRAVERSE_EXIT)
|
||||
return TRAVERSE_EXIT;
|
||||
t->struct_type()->finalize_methods(this->gogo_);
|
||||
break;
|
||||
return TRAVERSE_SKIP_COMPONENTS;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue