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

           Summary: Segfault while calling instance method of class
                    defined inside struct
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: jcrapuchet...@gmail.com


--- Comment #0 from Jonathan Crapuchettes <jcrapuchet...@gmail.com> 2013-10-14 
17:22:51 PDT ---
Running with D 2.063.2 the following code compiles and runs without any
problems. Using git checkout 4a2fabf, the code compiles, but segfaults when
trav.empty() is called. Possible changes to the code that will allow it to run
correctly are noted in the comments.

struct S
{
    //works if the class is moved out of the struct
    class InnerClass //works if final is added
    {
        S s;    //works if removed

        bool empty()
        {
            return true;
        }
    }
}

void main()
{
    S.InnerClass trav = new S.InnerClass();
    trav.empty();
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to