http://d.puremagic.com/issues/show_bug.cgi?id=5447



--- Comment #2 from Don <clugd...@yahoo.com.au> 2011-01-13 07:47:51 PST ---
(In reply to comment #1)

> Index: statement.c
> ===================================================================
> --- statement.c    (revision 871)
> +++ statement.c    (working copy)
> @@ -4435,8 +4435,9 @@
>  #endif
>      exp = exp->semantic(sc);
>      exp = resolveProperties(sc, exp);
> -    if (!exp->type->toBasetype()->isClassHandle())
> -        error("can only throw class objects, not type %s",
> exp->type->toChars());
> +    ClassDeclaration *cd = exp->type->toBasetype()->isClassHandle();
> +    if (!cd || ((cd != ClassDeclaration::throwable) &&
> !ClassDeclaration::throwable->isBaseOf(cd, NULL)))
> +        fd->error("can only throw class objects derived from Throwable, not
> type %s", exp->type->toChars());
>      return this;
>  }

Sorry, the fd->error(...)
should be  error(...)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to