[Mono-bugs] [Bug 23644] New - mcs is getting the incorrect overloaded method

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
18 Apr 2002 22:04:16 -0000


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 joe@ximian.com.

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

--- shadow/23644	Thu Apr 18 18:04:16 2002
+++ shadow/23644.tmp.29522	Thu Apr 18 18:04:16 2002
@@ -0,0 +1,76 @@
+Bug#: 23644
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: joe@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs is getting the incorrect overloaded method
+
+mcs seems to be picking the wrong overloaded method:
+
+./generated/Object.cs(17) error CS1502: The best overloaded match for
+method 'void GetProperty (string, System.IntPtr&)' has some invalid arguments
+./generated/Object.cs(17) error CS1503: Argument 2: Cannot convert from
+'out GLib.Object' to 'System.IntPtr&'
+./generated/Object.cs(17) error CS-00-6: Could not find any applicable
+function for this argument list
+
+The relevant code is:
+
+public Atk.Object AtkObjectNamePropertyParent {
+    get {
+        GLib.Object val;
+        GetProperty("atk_object_name_property_parent", out val);
+        return (Atk.Object) val;
+    }
+    ...
+}
+
+GetProperty() is overloaded with a bunch of different arguments, the two
+relevant of which are:
+
+public void GetProperty (String name, out GLib.Object val)
+{
+    IntPtr obj;
+    g_object_get (Raw, name, out obj, new IntPtr (0));
+    val = GLib.Object.GetObject (obj);
+}
+
+public void GetProperty (String name, out IntPtr val)
+{
+    g_object_get (Raw, name, out val, new IntPtr (0));
+}
+
+and they're in the IL:
+
+caedes:/cvs/mono/gtk-sharp/glib$ monodis glib-sharp.dll | grep GetProp
+           instance default void GetProperty(string name, [out] string&
+val)  cil managed 
+           instance default void GetProperty(string name, [out] bool& val)
+ cil managed 
+           instance default void GetProperty(string name, [out] float64&
+val)  cil managed 
+           instance default void GetProperty(string name, [out] float32&
+val)  cil managed 
+           instance default void GetProperty(string name, [out] int32& val)
+ cil managed 
+           instance default void GetProperty(string name, [out] uint32&
+val)  cil managed 
+           instance default void GetProperty(string name, [out] class
+GLib.Object& val)  cil managed 
+           instance default void GetProperty(string name, [out] class
+GtkSharp.Boxed& val)  cil managed 
+           instance default void GetProperty(string name, [out] native int&
+val)  cil managed 
+
+so it looks like mcs is choosing the wrong function.