proposed @noreturn attribute

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 10 11:38:21 PDT 2017


On 7/10/2017 4:00 AM, Steven Schveighoffer wrote:
> But I have to ask, what is the benefit of statically determining that a function 
> is noreturn?

It is useful anywhere dataflow analysis is useful.

    FunctionThatDoesnotReturn();
    a = b; // error: unreachable code


More information about the Digitalmars-d mailing list