[Issue 858] New: Forward reference to struct inside class crashes the compiler

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 19 12:36:03 PST 2007


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

           Summary: Forward reference to struct inside class crashes the
                    compiler
           Product: D
           Version: 1.00
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: georg.ramme at gmail.com


E:\prog\>dmd dontwork.d
---
The instruction as "0x004565b9" referenced memory at "0x00000038". The memory
could not be "read".
---

E:\prog\>dmd work.d
E:\apps\dm\bin\link.exe work,,,user32+kernel32/noi;


/** dontwork.d **/
class Outer
{
  public:
    this()
    {
        B sc = new B();
    }

    class B
    {
        Strct str;
    }
}

struct Strct
{
    int i;
}


int main(char[][] args)
{
    return 0;
}


/** work.d **/
struct Strct
{
    int i;
}

class Outer
{
  public:
    this()
    {
        B sc = new B();
    }

    class B
    {
        Strct str;
    }
}

int main(char[][] args)
{
    return 0;
}

***


-- 



More information about the Digitalmars-d-bugs mailing list