https://bugzilla.novell.com/show_bug.cgi?id=349194
Summary: Type.IsAssignableFrom fails for some dynamically emitted
types
Product: Mono: Class Libraries
Version: SVN
Platform: i586
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: CORLIB
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
QAContact: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Found By: ---
Repro:
--
using System;
using System.Reflection;
using System.Reflection.Emit;
namespace repro
{
public interface IFoo
{
}
public class BaseType : IFoo {
}
class Program
{
static void Main(string[] args)
{
AssemblyBuilder asm =
AppDomain.CurrentDomain.DefineDynamicAssembly(new AssemblyName("Foo"),
AssemblyBuilderAccess.Run);
ModuleBuilder module =
asm.DefineDynamicModule("Foo.exe");
TypeBuilder tb = module.DefineType("ConcreteFoo",
TypeAttributes.Public, typeof(BaseType));
Type t = tb.CreateType();
Console.WriteLine(typeof(IFoo).IsAssignableFrom(t));
}
}
}
--
It prints False while it should print True.
--
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.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs