[Issue 7296] New: [2.058] Regression: Cannot swap RefCounted

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 15 08:31:43 PST 2012


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

           Summary: [2.058] Regression:  Cannot swap RefCounted
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: dsimcha at yahoo.com
        Depends on: 7295


--- Comment #0 from David Simcha <dsimcha at yahoo.com> 2012-01-15 08:31:42 PST ---
This one is definitely caused by Bug 7295, but I'm reporting it as a separate
issue because the effect on Phobos is a regression.  The regression should be
fixed for next release come Hell or high water, even if 7295 is not fixed and
we have to resort to a workaround.

import std.algorithm, std.typecons;

void main() {
    RefCounted!int a, b;
    swap(a, b);
}

std\algorithm.d(1491): Error: pure function 'swap' cannot call impure function
'refCountedPayload'

-- 
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