PhobosWatch: manifest => enum

0ffh frank at youknow.what.todo.interNETz
Sun Dec 30 04:57:35 PST 2007


Derek Parnell wrote:
> On Sun, 30 Dec 2007 11:27:17 +0000, Janice Caron wrote:
> 
>> On 12/30/07, Bastiaan Veelo <Bastiaan at veelo.net> wrote:
>>> If not, that would be confusing to me, as you will
>>> be able to switch on some enums but not on others.
>> You can't switch on an anonymous enum. Anonymous enums have no type,
>> and therefore it is not even /possible/ to generate an expression
>> whose type is that of an anonymous enum!
>>
>> So switch/case survives unharmed.
> 
> And yet this compiles and runs ...
> 
> [source: switch with anon enum]

And I'd have been surprised if not... if it was called
"manifest", would anyone at all get the idea that you
can't case against them, because they are something oh
so entirely different from a literal number?

Ooops, wait... wasn't it supposed to be just like one? =)

regards, frank

---

Making a statement bold and confident doesn't make it true.



More information about the Digitalmars-d mailing list