[Mono-bugs] [Bug 642130] Activator.CreateInstance Method (Type, Object[]) does not work with compiler service (Mono.CSharp)
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Oct 4 10:50:51 EDT 2010
https://bugzilla.novell.com/show_bug.cgi?id=642130
https://bugzilla.novell.com/show_bug.cgi?id=642130#c2
Marek Safar <msafar at novell.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |msafar at novell.com
--- Comment #2 from Marek Safar <msafar at novell.com> 2010-10-04 14:50:50 UTC ---
SRE issue
simple repro
using System;
using System.Reflection;
using System.Reflection.Emit;
class Program
{
static void Main ()
{
AssemblyName asmname = new AssemblyName ();
asmname.Name = "assemfilename.exe";
AssemblyBuilder asmbuild = System.Threading.Thread.GetDomain ().
DefineDynamicAssembly (asmname,
AssemblyBuilderAccess.RunAndSave);
ModuleBuilder modbuild = asmbuild.DefineDynamicModule ("modulename",
"assemfilename.exe");
TypeBuilder myType = modbuild.DefineType ("Sample",
TypeAttributes.Public);
string[] typeParamNames = { "TFirst" };
GenericTypeParameterBuilder[] typeParams =
myType.DefineGenericParameters (typeParamNames);
myType.CreateType ();
TypeBuilder myType2 = modbuild.DefineType ("Host",
TypeAttributes.Public);
var fi = myType2.DefineField ("field", myType.MakeGenericType (typeof
(int)), FieldAttributes.Public);
myType2.CreateType ();
var t = asmbuild.GetType ("Host").GetFields ()[0];
Console.WriteLine (t.FieldType.GetType ());
Console.WriteLine (t.FieldType.GetConstructors ());
}
}
--
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