[Bug 156] New: Inheriting nested classes and "-inline" throws access violation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 24 10:19:25 PDT 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=156

           Summary: Inheriting nested classes and "-inline" throws access
                    violation
           Product: D
           Version: 0.157
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: sky at quit-clan.de


The following code throws an access violation when compiled with "-inline". It
works fine with other compiler flags.

------------------------------------------

module nestedclass2;

private import std.stdio;

class Foo
{
    class Bar
    {
        void doSayHello()
        {
            sayHello();
        }
    }
    Bar bar;

    void sayHello()
    {
        writefln("Hello");
    }

    this()
    {
        bar = new Bar();
    }
}

class Foo2 : Foo
{
}

int main(char[][] argv)
{
    Foo2 foo = new Foo2();
    writefln("This should print Hello:");
    foo.bar.doSayHello();

    return 0;
}


-- 




More information about the Digitalmars-d-bugs mailing list