[Issue 2067] call from anonymous class makes access violation.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 17 16:10:42 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2067





------- Comment #4 from benoit at tionex.de  2008-05-17 18:10 -------
Now DMD 1.030 is out and this minimal example works, but real program with this
scenario still crash.

I found a modification of the original test case that crashes on 1.030 but not
on 1.029 and 1.028.

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();
}


-- 



More information about the Digitalmars-d-bugs mailing list