www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14233] New: Can't build Algebraic!(This[]) anymore


          Issue ID: 14233
           Summary: Can't build Algebraic!(This[]) anymore
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: aliloko gmail.com

The following code compiles on DMD 2.064, 2.065, 2.066, 2.067 b1 but not 2.067

import std.variant;

alias Atom = Algebraic!(string, This[]);

Atom makeNil()
    Atom[] values = [];
    return Atom(values);

void main()

What I get now: 

Error: static assert  "Cannot store a VariantN!20u[] in a VariantN!(8u, string,

It used to work nicely. I would be nice to have at least a work-around for

Mar 01 2015