Cannot implicitly convert expression (struct this)
Andre Pany via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jul 5 04:29:39 PDT 2017
On Friday, 23 June 2017 at 15:52:10 UTC, Kagamin wrote:
> On Thursday, 22 June 2017 at 09:57:44 UTC, Andre Pany wrote:
>> This line raises the error:
>> TestStruct s2 = TestStruct(Reason.FU);
>>>> Error: cannot implicitly convert expression ("Fu") of type
>>>> Reason to InitialEnum!(Reason)
>>
>> While this line is working fine:
>> TestStruct s1 = {reason: Reason.FU};
>
> I think these should be equivalent, report a bug.
Issue 17552 created:
http://forum.dlang.org/post/mailman.3688.1498412595.31550.digitalmars-d-bugs@puremagic.com
Kind regards
André
More information about the Digitalmars-d-learn
mailing list