[Mono-bugs] [Bug 36804][Min] New - mcs does not allow calling of methods with SpecialName attribute

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Thu, 16 Jan 2003 05:41:07 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by vargaz@freemail.hu.

http://bugzilla.ximian.com/show_bug.cgi?id=36804

--- shadow/36804	Thu Jan 16 05:41:07 2003
+++ shadow/36804.tmp.6095	Thu Jan 16 05:41:07 2003
@@ -0,0 +1,63 @@
+Bug#: 36804
+Product: Mono/MCS
+Version: unspecified
+OS: Debian Woody
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: vargaz@freemail.hu               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs does not allow calling of methods with SpecialName attribute
+
+When I try to call a method with a SpecialName attribute, mcs fails with the
+"can not call operator or accessor" 
+error message. This is correct if the given method is a property accessor
+or operator, but not if the method is a simple method which happens to have
+the SpecialName flag set.
+
+A test case is below. To use:
+ilasm -o bug-specialname.dll bug-specialname.il
+mcs /r:bug-specialname.dll bug-specialname2.csc
+
+This compiles with MS csc but not with mcs.
+
+============================ bug-specialname.il ==========================
+.assembly extern mscorlib
+{
+  .ver 1:0:3300:0
+}
+.assembly 'bug-specialname'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+  .class public auto ansi beforefieldinit Bar
+  	extends [mscorlib]System.Object
+  {
+    .method public static specialname
+           default void bar()  cil managed 
+    {
+	.maxstack 8
+	IL_0000: ret 
+    } // end of method default void bar() 
+
+  } // end of type Bar
+
+==========================================================================
+========================= bug-specialname2.cs ============================
+using System;
+
+class Foo {
+
+	public static void Main() {
+		Bar.bar ();
+	}
+}
+==========================================================================