www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2123] New: Anonymous class crashes

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

           Summary: Anonymous class crashes
           Product: D
           Version: 1.030
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: benoit tionex.de


This test case crashes on 1.030 but not
on 1.029 and 1.028.


better to do this into its own bug report.

module test;
extern(C) int printf(char*,...);

class I {
    public abstract void callI();
}

class C  {
    private int index;
    void test1(){
        printf( "ok\n" );
    }
    I test(){
        auto i = new class() I {
            public void callI() {
                test1();
            }
        };
        return i;
    }
}
void main () {
    auto c = new C;
    auto i = c.test();
    i.callI();
}


-- 
May 23 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2123


bugzilla digitalmars.com changed:

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





Fixed dmd 1.031 and 2.015


-- 
Jun 22 2008