[Mono-bugs] [Bug 367668] New: ModuleBuilder.ResolveMethod() doesn't work
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Mar 6 02:52:10 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=367668
Summary: ModuleBuilder.ResolveMethod() doesn't work
Product: Mono: Class Libraries
Version: 1.9.0
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: CORLIB
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: jeroen at sumatra.nl
QAContact: mono-bugs at lists.ximian.com
Found By: ---
The following program fails on Mono but runs fine on .NET. Note that this is a
showstopper bug for IKVM 0.37 (current cvs).
using System;
using System.Reflection;
using System.Reflection.Emit;
public class Program
{
static void Main()
{
AssemblyBuilder ab =
AppDomain.CurrentDomain.DefineDynamicAssembly(new AssemblyName("foo"),
AssemblyBuilderAccess.Run);
ModuleBuilder modb = ab.DefineDynamicModule("foo.dll");
TypeBuilder tb = modb.DefineType("Foo");
MethodBuilder mb = tb.DefineMethod("Frub",
MethodAttributes.Static, null, new Type[] { typeof(IntPtr) });
int tok = mb.GetToken().Token;
mb.SetImplementationFlags(MethodImplAttributes.NoInlining);
ILGenerator ilgen = mb.GetILGenerator();
ilgen.Emit(OpCodes.Ret);
Type type = tb.CreateType();
modb.ResolveMethod(tok);
}
}
--
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