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


--- Comment #0 from monarchdodra gmail.com 2014-01-22 02:26:41 PST ---
//----
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


--- Comment #1 from bearophile_hugs eml.cc 2014-01-22 02:48:29 PST ---
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



--- Comment #2 from monarchdodra gmail.com 2014-01-22 03:13:42 PST ---
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