[Mono-bugs] [Bug 75636][Nor] Changed - mcs incorrectly handes hide-by-name virtual methods not marked with newslot

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jul 26 14:51:35 EDT 2005


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 at gmail.com.

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

--- shadow/75636	2005-07-26 07:36:20.000000000 -0400
+++ shadow/75636.tmp.13083	2005-07-26 14:51:35.000000000 -0400
@@ -3,21 +3,21 @@
 Version: 1.1
 OS: unknown
 OS Details: Mandriva Cooker i586
 Status: NEW   
 Resolution: 
 Severity: Unknown
-Priority: Wishlist
+Priority: Normal
 Component: C#
-AssignedTo: vargaz at gmail.com                            
+AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: goetz.waschk at gmail.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: ikvm awt doesn't build
+Summary: mcs incorrectly handes hide-by-name virtual methods not marked with newslot
 
 Please fill in this template when reporting a bug, unless you know what you
 are doing.
 Description of Problem:
 With mono 1.1.8.2, the awt part of ikvm 0.18.0.0 doesn't build.
 
@@ -72,6 +72,67 @@
 How often does this happen? 
 always
 
 Additional Information:
 
 It was reported to the ikvm bug tracker and closed as a Mono bug.
+
+------- Additional Comments From vargaz at gmail.com  2005-07-26 14:51 -------
+Here is a reduced testcase:
+
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< bug.il <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+.assembly bug {}
+.assembly extern mscorlib {}
+
+.class public auto ansi beforefieldinit Foo {
+
+    .method famorassem virtual  newslot 
+           instance default object clone ()  cil managed
+	{
+		.maxstack 8
+		ldarg.0
+		ret
+	}
+}
+
+.class public auto ansi Bar extends Foo {
+
+    .method public virtual 
+           instance default object clone ()  cil managed
+	{
+		.maxstack 8
+		ldarg.0
+		ret
+	}
+}
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+<<<<<<<<<<<<<<<<<<<<<<< bug2.cs <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+using System;
+
+public class Tests {
+
+	public static void Main () {
+		Bar bar = null;
+
+		bar.clone ();
+	}
+}
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+ilasm /dll bug.il
+mcs /r:bug.dll bug2.cs
+
+Produces:
+
+bug2.cs(8) error CS1501: No overload for method `clone' takes `0'
+arguments
+Compilation failed: 1 error(s), 0 warnings
+
+The problem here is that the 'clone' method in 'Bar' is not marked
+with newslot so mcs (or the runtime?) somehow thinks it overrides the
+method in 'foo'. This works fine on MS.NET.
+
+
+
+


More information about the mono-bugs mailing list