Unreachable statement, do or do not, there is no try

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Feb 10 13:11:30 PST 2015


On 2/10/2015 12:48 PM, deadalnix wrote:
> On Tuesday, 10 February 2015 at 20:37:16 UTC, Walter Bright wrote:
>> On 2/9/2015 11:07 PM, deadalnix wrote:
>>> On Tuesday, 10 February 2015 at 07:01:18 UTC, Jacob Carlborg wrote:
>>>> DMD will complain about the second example if warnings are enabled.
>>>
>>> Ok I think that answer the question.
>>
>> The thing is, you can still catch an Object, so catching Exception won't quite
>> catch them all.
>
> yes, but if you don't catch, then you continue unwinding, so whatever road you
> take, there is no way you reach whatever comes after the try.

I agree the flow analysis code (which is pretty simplistic) should be looked at 
again. You should file a bugzilla.


More information about the Digitalmars-d mailing list