OSDN Git Service

Fix inheriting hidden methods with arguments of hidden type.
[pf3gnuchains/gcc-fork.git] / gcc / go / gofrontend / expressions.cc
index 5529e6c..b0be483 100644 (file)
@@ -9239,7 +9239,13 @@ Call_expression::check_argument_type(int i, const Type* parameter_type,
                                     bool issued_error)
 {
   std::string reason;
-  if (!Type::are_assignable(parameter_type, argument_type, &reason))
+  bool ok;
+  if (this->are_hidden_fields_ok_)
+    ok = Type::are_assignable_hidden_ok(parameter_type, argument_type,
+                                       &reason);
+  else
+    ok = Type::are_assignable(parameter_type, argument_type, &reason);
+  if (!ok)
     {
       if (!issued_error)
        {