[DotGNU]Re: [Mono-list] Enum declaration; Conflicts and Blame for Interoperability Problems

Gopal V gopalv82@symonds.net
Tue, 7 Jan 2003 19:47:24 +0530

If memory serves me right, Paolo Molaro wrote:
> >     CLS Rule 9: Literal static fields (see clause 7.6.1) of an enum shall
> >     have the type of the enum itself.
> Paragraph 13.3 in Partition II says basically the same things, but adds
> soon after:
> shall be distinct from their underlying type.  For all other purposes,
>                                                ^^^^^^^^^^^^^^^^^^^^^^
> including verification and execution of 
> code, an unboxed enum freely interconverts with its underlying type.
> will implement Reflection.Emit, it'll have to support this stuff anyway,
> just like the MS runtime does.

So this is like saying Reflection.Emit API is to blame here ?. I wonder
what output MCS running on MS .NET would give ... (would it be the same ?).

Hmm... since CSCC does not use Reflection.Emit, I think we'll not be affected
by this bug at all ... and field boxing has already been added for resolving
enum members in the compiler.... (AFAIK).

I don't like the idea of complicating the image loading routines and 
modifying at load time. The runtime doesn't have any huge issues as 
enums are constant folded in either compiler ... hmm... though 
FieldInfo.GetValue() had slight problems... I've fixed that up in CVS ...

I think Qt# is digging up quite a few bugs ... (and some "virtual" bugs,
like this one).. It looks like Reflection.Emit API isn't as hot as they 
were made up to be ...

The difference between insanity and genius is measured by success