[Issue 7069] Variant Doesn't Handle Const or Immutable Contents

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Feb 15 14:21:57 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=7069


Kapps <opantm2+dbugs at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |opantm2+dbugs at gmail.com
         Resolution|                            |FIXED


--- Comment #3 from Kapps <opantm2+dbugs at gmail.com> 2014-02-15 14:21:53 PST ---
This appears to have been fixed in git master:
https://github.com/D-Programming-Language/phobos/commit/6e7eabbd42a7f2e3e555081e1b17893c3c18b6f8

import std.variant, std.stdio;

class Bob {}

void main() {
    immutable(Bob) bob = new immutable(Bob)();
    writeln(cast(void*)bob);
    Variant v = bob;

    immutable(Bob) bob2 = v.get!(immutable(Bob))();
    writeln(cast(void*)bob2);
}

Prints out

1091E4FF0
1091E4FF0

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


More information about the Digitalmars-d-bugs mailing list