[Issue 8898] New: false positive dangling else warning

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 26 11:47:59 PDT 2012


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

           Summary: false positive dangling else warning
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dawg at dawgfoto.de


--- Comment #0 from dawg at dawgfoto.de 2012-10-26 11:47:58 PDT ---
cat > bug.d << CODE
static if (true):

version (Foo)
{
}
else
{
}
CODE

> dmd -w -c bug
bug.d(6): Warning: else is dangling, add { } after condition at bug.d(1)

----

Seems like the else is associated with the static if by the dangling counter.

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


More information about the Digitalmars-d-bugs mailing list