Re: Algebraic changing type when in associative array

2020-02-04 Thread rous via Digitalmars-d-learn
On Tuesday, 4 February 2020 at 12:05:16 UTC, rikki cattermole wrote: On 05/02/2020 12:55 AM, rous wrote: On Tuesday, 4 February 2020 at 11:47:49 UTC, rikki cattermole wrote: It did not change type. "Algebraic data type restricted to a closed set of possible types. It's an alias for VariantN w

Re: Algebraic changing type when in associative array

2020-02-04 Thread rous via Digitalmars-d-learn
On Tuesday, 4 February 2020 at 11:47:49 UTC, rikki cattermole wrote: It did not change type. "Algebraic data type restricted to a closed set of possible types. It's an alias for VariantN with an appropriately-constructed maximum size." https://dlang.org/phobos/std_variant.html#.Algebraic O

Algebraic changing type when in associative array

2020-02-04 Thread rous via Digitalmars-d-learn
I'm defining an Algebraic type like this: alias Expr = Algebraic!(This[char], string, int); However, when I create an Expr from an associative array of chars and Exprs, the Exprs seem to change from Algebraic to VariantN!32LU types. This is illustrated in the following error message: cannot pas