std.sumtype needs implicit conversion to reach its full potential.

JN 666total at wp.pl
Thu Nov 18 12:31:40 UTC 2021


On Wednesday, 17 November 2021 at 08:34:28 UTC, Tejas wrote:
> ```d
> import std;
> struct A_VERY_LARGE_NAME{
>     int a;
> }
> void main()
> {
>     //A_VERY_LARGE_NAME[string] AA = ["fasf": 3, "hweh":5]; 
> 		//doesn't work :(
>     A_VERY_LARGE_NAME[string] AA = ["fasf": 
> A_VERY_LARGE_NAME(3), "hweh":A_VERY_LARGE_NAME(5)]; 	//works
> }
> ```

I don't know if ["fasf": 3, "hweh": 5] should work, but it would 
be nice if ["fasf": {a: 3}, "hweh": {a: 5}] worked.


More information about the Digitalmars-d mailing list