Bug 311102 (MONO24095) - monomcs compiler generates the IL for the delegate class outside of the namespace declaration
Summary: monomcs compiler generates the IL for the delegate class outside of the names...
Status: RESOLVED FIXED
Alias: MONO24095
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Enhancement
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: build
Depends on:
Blocks:
 
Reported: 2002-05-02 04:51 UTC by Brian Chapman
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 17:56:56 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".