Issue 2123 - Anonymous class crashes
Summary: Anonymous class crashes
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Linux
: P2 regression
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-23 12:47 UTC by Frank Benoit
Modified: 2014-02-24 15:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Frank Benoit 2008-05-23 12:47:08 UTC
This test case crashes on 1.030 but not
on 1.029 and 1.028.

I had this mentioned in bug #2067, but it was silently closed, so it is perhaps 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();
}
Comment 1 Walter Bright 2008-06-22 18:56:48 UTC
Fixed dmd 1.031 and 2.015