gcc_assert (fndecl_built_in_p (decl)
|| DECL_INTRINSIC_CODE (decl) != INTRINSIC_NONE);
- TypeFunction *tf = (TypeFunction *) fd->type;
+ TypeFunction *tf = fd->type->toTypeFunction ();
Expression *e = NULL;
input_location = make_location_t (loc);
if (fd->leastAsSpecialized (fd2) || fd2->leastAsSpecialized (fd))
{
- TypeFunction *tf = (TypeFunction *) fd->type;
- if (tf->ty == Tfunction)
- {
- error_at (make_location_t (fd->loc), "use of %qs",
- fd->toPrettyChars ());
- inform (make_location_t (fd2->loc), "is hidden by %qs",
- fd2->toPrettyChars ());
- inform (make_location_t (d->loc),
- "use %<alias %s = %s.%s;%> to introduce base class "
- "overload set", fd->toChars (),
- fd->parent->toChars (), fd->toChars ());
- }
- else
- {
- error_at (make_location_t (fd->loc), "use of %qs",
- fd->toPrettyChars ());
- inform (make_location_t (fd2->loc), "is hidden by %qs",
- fd2->toPrettyChars ());
- }
-
+ error_at (make_location_t (fd->loc), "use of %qs",
+ fd->toPrettyChars ());
+ inform (make_location_t (fd2->loc), "is hidden by %qs",
+ fd2->toPrettyChars ());
+ inform (make_location_t (d->loc),
+ "use %<alias %s = %s.%s;%> to introduce base class "
+ "overload set", fd->toChars (),
+ fd->parent->toChars (), fd->toChars ());
has_errors = true;
break;
}
if (sd->xhash)
{
- TypeFunction *tf = (TypeFunction *) sd->xhash->type;
- gcc_assert (tf->ty == Tfunction);
+ TypeFunction *tf = sd->xhash->type->toTypeFunction ();
if (!tf->isnothrow || tf->trust == TRUSTsystem)
{
warning (sd->xhash->loc, "toHash() must be declared as "