// Fill in a placeholder pointer type as a pointer. This takes a
// type returned by placeholder_pointer_type and arranges for it to
- // point to to_type. Returns true on success, false on failure.
+ // point to the type that TO_TYPE points to (that is, PLACEHOLDER
+ // becomes the same type as TO_TYPE). Returns true on success,
+ // false on failure.
virtual bool
set_placeholder_pointer_type(Btype* placeholder, Btype* to_type) = 0;
package != NULL,
Gogo::is_hidden_name(name),
this->location_);
+ else if (function == NULL)
+ {
+ go_assert(saw_errors());
+ bvar = backend->error_variable();
+ }
else
{
tree fndecl = function->func_value()->get_decl();
return this->to_type_->hash_for_method(gogo) << 4;
}
-// The tree for a pointer type.
+// Get the backend representation for a pointer type.
Btype*
Pointer_type::do_get_backend(Gogo* gogo)
}
// Return the backend representation of the element type.
+
Btype*
Array_type::get_backend_element(Gogo* gogo)
{
this->find_type_->add_dependency(type->named_type());
break;
+ case Type::TYPE_NAMED:
+ case Type::TYPE_FORWARD:
+ go_assert(saw_errors());
+ break;
+
case Type::TYPE_VOID:
case Type::TYPE_SINK:
case Type::TYPE_FUNCTION:
case Type::TYPE_MAP:
case Type::TYPE_CHANNEL:
case Type::TYPE_INTERFACE:
- case Type::TYPE_NAMED:
- case Type::TYPE_FORWARD:
default:
go_unreachable();
}