[Mono-dev] generic constraints support for corcompare

Atsushi Eno atsushi at ximian.com
Wed Oct 5 15:00:18 EDT 2005


Hi,

>> The attached patch makes corcompare stuff to differentiate generic
>> constraints (i.e. "where") on both types and method parameters.
> 
> Hi,
> 
> this is really cool :-)

Thanks :-)

>> (To see the expected results you will have to create your own
>> masterinfos.)
>>
>> It should just work, but am wondering how those diffs should be
>> shown in the class status pages. Currently this patch just puts
>> mysterious "missing" mark on types.
>> Any good ideas? Or if anyone hacks a fix it would be awesome.
> 
> Well, first of all, we need to include the type parameter names in the
> type names, ie. use "ICollection[T]" instead of "ICollection`1".  Btw. I
> just realized that the display of generic types is currently broken
> anyways.

Well, for some cases base types are bound (i.e. they are not T but
concrete System.Blah) where type.ToString() shows "Foo`1[Bar]".

For generic constraints I added, it does not seem showing `1 so I
think it's fine (it would depend on what comes after "where" though).

For the "broken" ToString(), I've filed a bug a few days ago:
http://bugzilla.ximian.com/show_bug.cgi?id=76277

> After that, maybe we can make things look like this:
> 
> 	IDictionary[K,V]
> 	+   K : IEnumerable[V]
> 	X   V : class

Ok, it looks cool. I'd take this way.

Atsushi Eno



More information about the Mono-devel-list mailing list