[Issue 7070] New: can't assign null to Variant

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 6 04:19:45 PST 2011


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

           Summary: can't assign null to Variant
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: mrmocool at gmx.de


--- Comment #0 from Trass3r <mrmocool at gmx.de> 2011-12-06 04:19:43 PST ---
If it isn't supposed to work anymore, just close the report.

import std.variant;
void main()
{
    Variant v;
    v = null;
}

$ dmd test.d 
/std/traits.d(1755): Error: static assert  "argument is not a class or
interface"
/std/traits.d(1818):        instantiated from here:
BaseTypeTuple!(typeof(null))
/std/traits.d(1933):        instantiated from here:
BaseClassesTuple!(typeof(null))
/std/traits.d(2230):        instantiated from here:
TransitiveBaseTypeTuple!(typeof(null))
/std/variant.d(255):        instantiated from here:
ImplicitConversionTargets!(typeof(null))
/std/variant.d(543):        instantiated from here: handler!(typeof(null))
test.d(6):        instantiated from here: opAssign!(typeof(null))

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