[Issue 9580] std.variant.Algebraic with Tuple format problem
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Dec 27 03:41:25 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=9580
--- Comment #2 from bearophile_hugs at eml.cc 2013-12-27 03:41:21 PST ---
Now the original code compiles with no errors. But if I try to to instantiate a
Foo that contains an array of Foos:
import std.variant: Algebraic, This;
import std.typecons: Tuple;
alias Foo = Algebraic!(int, Tuple!(This[]));
void main() {
auto f = Foo(0);
auto f = Foo([Foo(0)]);
}
I see (dmd 2.065alpha):
...\dmd2\src\phobos\std\variant.d(548): Error: static assert "Cannot store a
VariantN!(8u, int, Tuple!(This[]))[] in a VariantN!(8u, int, Tuple!(This[]))"
temp.d(6): instantiated from here: __ctor!(VariantN!(8u, int,
Tuple!(This[]))[])
--
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