[Issue 17807] Spurious dead code warnings on enum and static variables.

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Sep 4 20:36:07 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=17807

timon.gehr at gmx.ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Spurious dead code warnings |Spurious dead code warnings
                   |with static foreach         |on enum and static
                   |                            |variables.

--- Comment #1 from timon.gehr at gmx.ch ---
Reduced test case:

int main(string[] args){
    int y=0;
    import std.conv;
    switch(args[1].to!int){
        { case 0: break; }
        enum x=0;
        default: y=x;
    }
    return y;
}

--


More information about the Digitalmars-d-bugs mailing list