Summary: Impossible to initialize a member struct without
                    default constructor or assigment
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-05-18 17:05:19 PDT ---
struct S
    @disable this();
    this(int) { }
    @disable void opAssign(typeof(this));

class Test
    S s = void;      // I *EXPLICITLY* told it not to be initialized, but...
    this() { s = S(to!int("1")); }

void main() { new Test(); }

Error: function S.opAssign is not callable because it is annotated with
Error: default construction is disabled for type Test

Structs without default constructors are pretty much impossible to use.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to