www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5303] New: (mtype.c) Compiler crash caused by pure

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

           Summary: (mtype.c) Compiler crash caused by pure
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



struct Foo {}
void bar(T)(Foo* f) pure if(true) {}
void main() {
    bar!(int)(null);
}


DMD 2.050 shows:
Assertion failure: 'tn->mod & MODimmutable || tn->mod & MODconst' on line 876
in file 'mtype.c'

If I remove the pure the error vanishes.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 01 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5303


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |DUPLICATE



Could be the most duplicated bug of all time.

*** This issue has been marked as a duplicate of issue 4434 ***

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