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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun May 4 14:30:50 PDT 2008


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

           Summary: call from anonymous class makes access violation.
           Product: D
           Version: 1.029
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: benoit at tionex.de


module test;
extern(C) int printf(char*,...);
class I {
    abstract void callI();
}
class Base {
    int index;
}
class C : Base {
    void test1(){
        printf( "ok\n" );
    }
    void test(){
        auto i = new class() I {
            public void callI() {
                test1();
                if( index is -1 ){ // Access to the outer-super-field triggers
the bug
                    test1();
                }
            }
        };
        i.callI();
    }
}
void main () {
    auto c = new C;
    c.test();
}


-- 



More information about the Digitalmars-d-bugs mailing list