[Mono-bugs] [Bug 337471] New: Type.GetType() returns compiled type

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Oct 29 07:08:33 EDT 2007


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

           Summary: Type.GetType() returns compiled type
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: kobruleht2 at hot.ee
         QAContact: mono-bugs at ximian.com
          Found By: ---


To reproduce, run the code.

Observed:

ExtendedCustomer messagebox is shown


Expected:

NullReferenceException should occur


Code:

using System;
using System.Windows.Forms;
using System.CodeDom.Compiler;

static class Program {

        static void Main() {
                CodeDomProvider provider =
CodeDomProvider.CreateProvider("CSharp");
                CompilerParameters compilerParameters = new
CompilerParameters();
                compilerParameters.GenerateInMemory = true;
                CompilerResults compilerResults =
                                
provider.CompileAssemblyFromSource(compilerParameters,
@"
public class ExtendedCustomer {
        }
");

                Type
                        xx =
compilerResults.CompiledAssembly.GetType("ExtendedCustomer");
               
MessageBox.Show(Type.GetType(xx.AssemblyQualifiedName).ToString());
        }
}

Enivronment:

MONO 1.2.5
VCSE 2005
NET 2
Windows XP


-- 
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