www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1821] New: ICE when using __traits isSame on const/invariant variables

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

           Summary: ICE when using __traits isSame on const/invariant
                    variables
           Product: D
           Version: 2.010
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: gide nwawudu.com


import std.stdio;

int a;
const int b;
enum { int c = 0 };
invariant int d = 0;

void main()
{
    writefln(__traits(isSame, a, a)); // Ok
    writefln(__traits(isSame, b, b)); // CRASH
    writefln(__traits(isSame, c, c)); // CRASH
    writefln(__traits(isSame, d, d)); // CRASH
}


-- 
Feb 08 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1821


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #1 from bugzilla digitalmars.com  2008-03-07 00:28 -------
Fixed dmd 2.012


-- 
Mar 06 2008