dmd 1.074 and 2.059 release

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri Apr 13 16:49:16 PDT 2012


On 4/14/12, Robert Clipsham <robert at octarineparrot.com> wrote:
> It can't throw a Throwable

Well now I'm confused. According to TDPL p307:

"nothrow promises that the function won't throw an Exception. The
function is still allowed to throw the graver Throwable class."

And yet this is an error:

nothrow void foo() {
    throw new Throwable("");
}
void main() { }

test.d(6): Error: object.Throwable is thrown but not caught
test.d(4): Error: function test.foo 'foo' is nothrow yet may throw

So who is the outlier here?


More information about the Digitalmars-d-announce mailing list