Bugzilla – Bug 311102
monomcs compiler generates the IL for the delegate class outside of the namespace declaration
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by ripcurl187@yahoo.com 2002-05-01 21:51:05 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: monomcs compiler generates the IL for the delegate class outside of the namespace declaration Steps to reproduce the problem: 1. Compile the following class using monomcs.exe and csc.exe as a library: using System; namespace DelegateTest { public delegate void TestDelegate(object sender, EventArgs args); public class TestClass { public TestClass() {} } } 2. View the IL (see below in "Actual Results:") Actual Results: microsoft compiler: // ============== CLASS STRUCTURE DECLARATION ================== // .namespace DelegateTest { .class public auto ansi sealed TestDelegate extends [mscorlib]System.MulticastDelegate { } // end of class TestDelegate .class public auto ansi beforefieldinit TestClass extends [mscorlib]System.Object { } // end of class TestClass } // end of namespace DelegateTest monomcs compiler: // ============== CLASS STRUCTURE DECLARATION ================== // .namespace DelegateTest { .class public auto ansi beforefieldinit TestClass extends [mscorlib]System.Object { } // end of class TestClass } // end of namespace DelegateTest .class public auto ansi sealed TestDelegate extends [mscorlib]System.MulticastDelegate { } // end of class TestDelegate Expected Results: monomcs should have placed the delegate generated class inside the namespace declaration How often does this happen? Every time. Additional Information: ---- Additional Comments From lupus@ximian.com 2002-05-04 07:00:26 MST ---- This happens when mcs is run both with the mono and windows runtime. ---- Additional Comments From miguel@ximian.com 2002-05-04 17:39:56 MST ---- Thanks for the bug report, I have now fixed this on CVS Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>XP Professional</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".