www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1915] New: new struct destructor : ice dmd

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

           Summary: new struct destructor : ice dmd
           Product: D
           Version: 2.012
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: spam extrawurst.org


in dmd 2.012 this crashes the compiler after just adding an empty struct
destructor, i really dont have a clue why:

[CODE]
module main;

import std.math;

struct Foo{

        ~this(){}  //comment out and it works as expected

        public int opCmp(Foo _a){return 0;}
}

void main(){
        Foo[] m_imgs;

        auto res = std.algorithm.isSorted!("a > b")(m_imgs);
}
[/CODE]


-- 
Mar 12 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1915


unknown simplemachines.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |unknown simplemachines.org
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME




------- Comment #1 from unknown simplemachines.org  2009-03-29 22:45 -------
Works for me in DMD 2.026, and D 1 doesn't allow struct destructors.

-[Unknown]


-- 
Mar 29 2009