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

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.


Reply via email to