diff options
Diffstat (limited to 'gcc/go/gofrontend/expressions.cc')
| -rw-r--r-- | gcc/go/gofrontend/expressions.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index d1de203..791ab07 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -8558,10 +8558,11 @@ Call_expression::do_check_types(Gogo*) if (first_arg_type->points_to() == NULL) { // When passing a value, we need to check that we are - // permitted to copy it. + // permitted to copy it. The language permits copying + // hidden fields for a method receiver. std::string reason; - if (!Type::are_assignable(fntype->receiver()->type(), - first_arg_type, &reason)) + if (!Type::are_assignable_hidden_ok(fntype->receiver()->type(), + first_arg_type, &reason)) { if (reason.empty()) this->report_error(_("incompatible type for receiver")); |
