[Mono-list] mcs bug and Reflection.Emit shortcoming

Paolo Molaro lupus@ximian.com
Thu, 13 Jun 2002 16:32:45 +0200


On 06/13/02 Jeroen Frijters wrote:
> I just wrote some test code on Microsoft's implementation, and their
> implementation for Reflection.Emit doesn't use MethodInfo.ReflectedType,
> so if you change the behaviour of Mono's Reflection.Emit, you won't be
> compatible.

Uhm, bummer. Well, I guess that should be reported to the microsoft folks.
Could you share the tests with us, so I'll make our code do the correct
thing.

> I fear that this, along with the (bigger) issue of lack of module
> support pretty much mean that mcs won't run on Microsoft's
> implementation. Are there any other issues you're aware of?

There are a couple of other limitations with the Reflection API:
you can't know if a field or variable is volatile and you can't add
required or optional modifiers to types. There may be some more issues
related to the compilation of corlib.
mcs already works around a couple of bugs in the ms reflection code
and issues a warning in that case.
We plan to workaround any such issues in our corlib until they fix their
stuff and issue a warning when running with their runtime. Fortunately
the issues are fairly minor and running mcs with the mono runtime is
faster anyway:-)

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better