[Mono-bugs] [Bug 35413][Nor] Changed - MCS wrongly indicates duplicate attribute
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
10 Dec 2002 22:12:38 -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 ravi@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=35413
--- shadow/35413 Tue Dec 10 16:27:24 2002
+++ shadow/35413.tmp.1570 Tue Dec 10 17:12:38 2002
@@ -1,23 +1,23 @@
Bug#: 35413
Product: Mono/MCS
Version: unspecified
OS: All
OS Details:
-Status: NEW
+Status: ASSIGNED
Resolution:
-Severity:
+Severity: Unknown
Priority: Normal
Component: Misc
AssignedTo: mono-bugs@ximian.com
ReportedBy: jonpryor@vt.edu
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
URL:
Cc:
-Summary: MCS doesn't support attribute targets
+Summary: MCS wrongly indicates duplicate attribute
Please fill in this template when reporting a bug, unless you know what you
are doing.
Description of Problem:
mcs doesn't support "attribute targets" (See ECMA-334, Section 24.2, page
@@ -77,6 +77,52 @@
I think most of the attribute targets are provided for disambiguation.
However, the "return" target is also visible through Reflection; the
attribute specified on the "return" target is available through
System.Reflection.MethodInfo.ReturnTypeCustomAttributes.
This will need to be fixed for full C# language support.
+
+------- Additional Comments From ravi@ximian.com 2002-12-10 17:12 -------
+Please run your test with csc before filing a bug. In this case, your
+test case is not even correct C#. It should be :
+
+
+using System;
+
+class FooAttribute : Attribute { }
+
+delegate void BarDelegate ();
+
+[type: Foo ()]
+class Test {
+
+ [field: Foo]
+ int a;
+
+
+ [event: Foo ()]
+ event BarDelegate ev;
+
+ [method: Foo ()]
+ [return: Foo]
+ void Method ([param: Foo ()] int a)
+ {
+
+ }
+
+ [property: Foo ()]
+ bool Property {
+ get {return false;}
+ }
+
+ public static void Main ()
+ {
+ }
+}
+
+This on being run with csc compiles fine and flags a wrong error with
+mcs :
+bug.cs(19) error CS0579: Duplicate 'Foo' attribute
+
+
+So lemme fix this now
+