Thread overview
[Issue 8212] New: shared value data structures should implicitly cast to mutable
Jul 22, 2012
Walter Bright
June 08, 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@puremagic.com
        ReportedBy: schveiguy@yahoo.com


--- Comment #0 from Steven Schveighoffer <schveiguy@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: -------
July 22, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8212



--- Comment #1 from github-bugzilla@puremagic.com 2012-07-22 02:02:13 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/ea90073a544ba3131629f77e310658687f4f8d91 fix Issue 8212 - shared value data structures should implicitly cast to mutable

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 22, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8212


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


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