[Mono-bugs] [Bug 82507][Nor] New - Confusing error message with a name conflict

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Aug 20 17:09:59 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 alan.mcgovern at gmail.com.


--- shadow/82507	2007-08-20 17:09:58.000000000 -0400
+++ shadow/82507.tmp.6327	2007-08-20 17:09:58.000000000 -0400
@@ -0,0 +1,41 @@
+Bug#: 82507
+Product: Mono: Compilers
+Version: 1.0
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: alan.mcgovern at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Confusing error message with a name conflict
+I have a class which inherits from Gtk.Bin and i have a class called 'Path'.
+public class Path
+    static string Name = "Bob";
+public class Test : Gtk.Bin
+    public Test()
+    {
+        Console.WriteLine(Path.Name);
+    }
+If i try to compile the above code i get a message saying 'object does not
+contain a definition for 'Name'. The reason is that gmcs sees the method
+first, notices that the method returns an object which does not have a
+property called 'Name' and then bails.
+Maybe i should be warned that there's a conflict between a method and a
+class whose static members i'm trying to access.

More information about the mono-bugs mailing list