enums extension

Mehrdad wfunction at hotmail.com
Thu May 17 11:28:04 PDT 2012


On Thursday, 17 May 2012 at 18:27:07 UTC, Mehrdad wrote:
> On Wednesday, 16 May 2012 at 06:24:54 UTC, Robert DaSilva wrote:
>> The inheritances notation implies that it's a subset and can 
>> be assigned to an instances of the base. This would not be 
>> true with enums.
>> FileAccessMask foo = FileAccessMask.FILE_READ_DATA;
>> AccessMask bar = foo; // Error
>
> Actually, that^ *should* work in my case; that was my point...

Wait, no, scratch that, I misread it; you're right.
It shouldn't work without a cast, but it should work with a cast.


More information about the Digitalmars-d mailing list