[Issue 2801] New: std.typecons.Unique does not work

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 4 21:53:53 PDT 2009


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

           Summary: std.typecons.Unique does not work
           Product: D
           Version: 2.027
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: jarrett.billingsley at gmail.com


I can't get anything to compile, even the example code:

import std.typecons;

class A {}

void main()
{
    Unique!(A) a = new A();
}

This just gives the error:

foo.d(12): Error: e2ir: cannot cast from foo.A to Unique!(A)

I've tried classes, structs, basic types etc.  They all give the same error.


-- 



More information about the Digitalmars-d-bugs mailing list