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

           Summary: DMD Stack Overflow with a struct member function
                    inside a C-style struct initializer
           Product: D
           Version: 2.036
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: sandf...@jhu.edu


--- Comment #0 from Rob Jacques <sandf...@jhu.edu> 2009-12-03 13:45:02 PST ---
This is a regression between DMD 2.035 and DMD 2.036. Here is a simplified test
case:

struct Foo {
    Foo bar() { return this; }
}

struct Bar {
    Foo foo;
    Bar opCom() {
        Bar r = { foo.bar() }; // Error caused by this line
        return r;
    }
}

The simple work around is to use D style constructors: Bar r = ( foo.bar() );
or to set the fields manually. However, tracking these down is very difficult
because there is no line number nor easy find/replace.

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

Reply via email to