[Issue 9580] std.variant.Algebraic with Tuple format problem
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Dec 27 04:15:11 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=9580
--- Comment #3 from bearophile_hugs at eml.cc 2013-12-27 04:15:08 PST ---
Sorry, the code in comment2 is wrong. This should be better:
import std.variant: Algebraic, This;
import std.typecons: Tuple, tuple;
alias Foo = Algebraic!(int, Tuple!(This[]));
void main() {
auto f = Foo(tuple([Foo(0)]));
}
The error messages:
...\dmd2\src\phobos\std\variant.d(548): Error: static assert "Cannot store a
Tuple!(VariantN!(8u, int, Tuple!(This[]))[]) in a VariantN!(8u, int,
Tuple!(This[]))"
temp.d(5): instantiated from here: __ctor!(Tuple!(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