[Mono-bugs] [Bug 591225] Problem when using Reflection.Emit to create a class derived from an abstract class containing a Generic property

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Apr 8 21:50:14 EDT 2010



--- Comment #2 from Rodrigo Kumpera <rkumpera at novell.com> 2010-04-09 01:50:13 UTC ---
The issue here is much simpler:

AssemblyName assemblyName = new AssemblyName ("a");
AssemblyBuilder ass = AppDomain.CurrentDomain.DefineDynamicAssembly
(assemblyName, AssemblyBuilderAccess.RunAndSave);
var mb = ass.DefineDynamicModule ("a.dll");

var tb = mb.DefineType ("Base");
tb.DefineGenericParameters ("F");

var inst = tb.MakeGenericType (typeof (int));
var tb2 = mb.DefineType ("Child", TypeAttributes.Public, inst);

tb.CreateType ();
tb2.CreateType ();

When tb2.CreateType() is called, it tried to define a default constructor,
which requires the parent GetConstructor() to work, which is only possible for
finished types.

The issue is that we don't resolve the SRE type into its concrete type.

Configure bugmail: http://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