[Issue 8212] New: shared value data structures should implicitly cast to mutable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 8 15:07:07 PDT 2012


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

           Summary: shared value data structures should implicitly cast to
                    mutable
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: schveiguy at yahoo.com


--- Comment #0 from Steven Schveighoffer <schveiguy at yahoo.com> 2012-06-08 15:09:07 PDT ---
in 2.059, this works:

shared int x;

void main()
{
   int y = x;
}

However, this does not:

struct S { int x; }

shared S s;

void main()
{
   S s2 = s;
}

Error: cannot implicitly convert expression (s) of type shared(S) to S

Clearly these are equivalent.

The above code compiles fine in 2.056, but not in 2.057, so I marked this as a
regression.

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


More information about the Digitalmars-d-bugs mailing list