www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11964] New: Poor diagnostic in static assert with boolean operators

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11964

           Summary: Poor diagnostic in static assert with boolean
                    operators
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: monarchdodra gmail.com



//----
void main()
{
    enum a = 0;
    enum b = 1;
    enum c = 2;
    static assert(b < a && a < b && b < c);
}
//----

This creates:
//----
Error: static assert  (false && 1 < 2) is false
//----

This is not helpful at all.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 22 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11964


bearophile_hugs eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs eml.cc



Related to Issue 5004 ?

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 22 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11964




I think they are both ER on a same feature, yes, but the "root issue" seems
completely different.

5004 is about aliases. This is about which value you actually show when the
assert is triggered.

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