[Mono-bugs] [Bug 71992][Nor] New - regression: CS0104 reported for property access
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 31 Jan 2005 04:07:56 -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 gert.driesen@pandora.be.
http://bugzilla.ximian.com/show_bug.cgi?id=71992
--- shadow/71992 2005-01-31 04:07:56.000000000 -0500
+++ shadow/71992.tmp.25325 2005-01-31 04:07:56.000000000 -0500
@@ -0,0 +1,69 @@
+Bug#: 71992
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: gert.driesen@pandora.be
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: regression: CS0104 reported for property access
+
+Compile the following code (using /target:library):
+
+namespace Whatever.Core {
+ public class Project {
+ }
+
+ public class A {
+ public Project Project {
+ get { return new Project(); }
+ }
+ }
+}
+
+namespace SomethingElse.Core {
+ public class Project {
+ }
+}
+
+namespace Whatever.App {
+ using Whatever.Core;
+ using SomethingElse.Core;
+
+ public class B : A {
+ public string Execute() {
+ return Project.ToString();
+ }
+
+ }
+}
+
+Actual Results:
+
+test.cs(23) error CS0104: `Project' is an ambiguous reference
+(Whatever.Core.Prject or SomethingElse.Core.Project)
+Compilation failed: 1 error(s), 0 warnings
+
+Expected Results:
+
+Successful compilation as in this case Project is referring to a member
+(property) not a type.
+
+How often does this happen?
+
+Always
+
+Additional Information:
+
+Works fine using csc and used to work fine using previous versions of mcs.
+
+As of recently, both mcs and gmcs (SVN HEAD) fail to compile this code. I
+haven't yet checked whether this still compiles on the brach for Mono 1.0.