Hey Keith,

On Jan 12, 2012, at 4:57 AM, Keith Sheppard wrote:
> I guess I'm just bringing this up incase someone else runs into
> this and also to see if anyone knows of other differences between
> reference types and their resolved counterparts that might be
> surprising.

It is surprising.

> I assume this is a feature and not a bug.

Changing this would indeed be a breaking change.

You see, when you have an assembly which references the corlib, in the 
signatures, you do have the information that the ElementType is a primitive 
type. But in the corlib itself, the TypeDefinition for System.Int32 is a value 
type just like you could write your own structs.

.IsPrimitive could be override for TypeDefinition to return true for the set of 
primitives.
.MetadataType, could also be overridden, as long as Cecil keeps its .etype in 
order.

Jb
 

-- 
--
mono-cecil

Reply via email to