[Mono-bugs] [Bug 354047] New: Type created by MakeGenericType () from a finished TypeBuilder is flagged as a generic type definition

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jan 15 18:01:32 EST 2008


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


           Summary: Type created by MakeGenericType () from a finished
                    TypeBuilder is flagged as a generic type definition
           Product: Mono: Runtime
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: generics
        AssignedTo: rkumpera at novell.com
        ReportedBy: vargaz at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Under MS, this testcase prints False, while under mono, it prints True.
Rodrigo, I think this is due to your changes, especially this line in
mono_metadata_is_type_builder_generic_type_definition ():
        if (!is_dynamic || container_class->wastypebuilder ||
container->type_argc != inst->type_argc)
           return FALSE;

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

using System;
using System.Reflection;
using System.Reflection.Emit;
using System.Threading;

public class Tests
{
        public static void Main (String[] args) {
                AssemblyName assemblyName = new AssemblyName ();
                assemblyName.Name = "foo";

                AssemblyBuilder assembly =
                        Thread.GetDomain ().DefineDynamicAssembly (
                                        assemblyName,
AssemblyBuilderAccess.RunAndSave);

                ModuleBuilder module = assembly.DefineDynamicModule ("foo");

                TypeBuilder tb = module.DefineType ("Foo",
TypeAttributes.Public);
                GenericTypeParameterBuilder[] typeParams =
tb.DefineGenericParameters (new String[] { "T" });

                Type t = tb.CreateType ();

                Type inst = tb.MakeGenericType (typeParams [0]);

                Console.WriteLine (inst.IsGenericTypeDefinition);
        }
}


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


More information about the mono-bugs mailing list