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

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

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

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

The simple work around is to use D style constructors: Bar r = ( );
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:
------- You are receiving this mail because: -------

Reply via email to