https://issues.dlang.org/show_bug.cgi?id=21793

          Issue ID: 21793
           Summary: Cannot initialize shared member with
                    -preview=nosharedaccess
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

The following code doesn't compile with -preview=nosharedaccess:

struct Child
{
    this(int) shared {}
}

struct Parent
{
    shared Child ch;
    this(int i) shared
    {
        ch = shared Child(i);
    }
}

--

Reply via email to