[Mono-bugs] [Bug 82028][Nor] New - [GMCS] Wrong method names with type parameters produced

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Jul 7 04:02:24 EDT 2007


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 gert.driesen at pandora.be.

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

--- shadow/82028	2007-07-07 04:02:24.000000000 -0400
+++ shadow/82028.tmp.20217	2007-07-07 04:02:24.000000000 -0400
@@ -0,0 +1,75 @@
+Bug#: 82028
+Product: Mono: Compilers
+Version: 1.2
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: gert.driesen at pandora.be               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] Wrong method names with type parameters produced
+
+When a method of property name includes type parameters (eg. implicit 
+interface implementation), then gmcs current produces wrong names.
+
+Example 1
+
+  C# code:
+
+    T IConvert<T>.Result {
+      get { return default (T); }
+    }
+
+  IL:
+
+    * MS *
+    .method private hidebysig newslot specialname virtual final 
+          instance !T  'IConvert<T>.get_Result'() cil managed
+
+    * Mono *
+    .method private hidebysig newslot specialname virtual final 
+          instance !T  'IConvert`1[T].get_Result'() cil managed
+
+Example 2
+
+  C# code:
+
+    void IConvert<KeyPair<K, T>>.Convert (KeyPair<K, T> x, KeyPair<K, T> y)
+    {
+    }
+
+  IL:
+
+    * MS *
+    .method private hidebysig newslot virtual final 
+          instance void  'IConvert<KeyPair<K,T>>.Convert'(class
+          KeyPair`2<!K,!T> x, class KeyPair`2<!K,!T> y) cil managed
+
+    * Mono *
+    .method private hidebysig newslot virtual final
+          instance void  'IConvert`1[[KeyPair`2[K,T], test, 
+Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].Convert'(class 
+KeyPair`2<!K,!T> x, class KeyPair`2<!K,!T> y) cil managed
+
+I've attached the source code, and both the MS and Mono produced IL.
+
+Compiling the source code using CSC are running it on either Mono or MS 
+results in the following (expected) output:
+
+IConvert<KeyPair<K,T>>.Convert
+IConvert<KeyPair<K,T>>.get_Result
+
+Compiling it using GMCS and running it on either Mono or MS yields the 
+following output:
+
+IConvert`1[[KeyPair`2[K,T], test, Version=0.0.0.0, Culture=neutral, 
+PublicKeyToken=null]].Convert
+IConvert`1[[KeyPair`2[K,T], test, Version=0.0.0.0, Culture=neutral, 
+PublicKeyToken=null]].get_Result


More information about the mono-bugs mailing list