[Mono-bugs] [Bug 443763] New: Reflection + Generics - Exception

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Nov 11 09:14:47 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=443763


           Summary: Reflection + Generics - Exception
           Product: Mono: Runtime
           Version: 2.0
          Platform: i686
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: generics
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: matthijsterwoord at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Other


Hello,

I have an assembly analysis tool which uses rreflection to inspect the
assemblies. On Windows + .NET this tool work very nice. Now I want to run this
tool on mono too (for now just on Windows) but i'm experiencing issues.

The tool also inspects the method bodies. for getting references to the
MethodInfo instances etc, I use Module.ResolveMethod. However, this method
throws an exception when the method is in a generic class (ie,
System.Collections.List<int>.Add(..) )

Is this a known (and intended) limitation? or is it a thusfar undiscovered bug?

it boils down to this:
+ we made an I'll reader, which reads I'll from the method bode
it resolves il opcode operands

assume this code:
var xTest = new List<int>();

this is encoded as il opcode newobj, which gets a method handle passed
as operand. this handle can be passed to Module.ResolveMethod, which
in this case doesn't work 

Regards,

Matthijs ter Woord


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list