[Mono-bugs] [Bug 81529][Wis] New - AllowMultiple flag inheritance

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat May 5 08:33:47 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 sanxiyn at gmail.com.

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

--- shadow/81529	2007-05-05 08:33:47.000000000 -0400
+++ shadow/81529.tmp.1370	2007-05-05 08:33:47.000000000 -0400
@@ -0,0 +1,54 @@
+Bug#: 81529
+Product: Mono: Compilers
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: sanxiyn at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: AllowMultiple flag inheritance
+
+Steps to reproduce the problem:
+
+using System;
+
+[AttributeUsage(AttributeTargets.All, AllowMultiple=true)]
+public class MyAttribute : Attribute {}
+
+public class SubAttribute : MyAttribute {}
+
+public class test {
+    [SubAttribute]
+    [SubAttribute]
+    public void method() {}
+}
+
+Actual Results:
+
+$ mcs -t:library test.cs 
+test.cs(9,6): error CS0579: The attribute `SubAttribute' cannot be applied
+multiple times
+test.cs(10,6): (Location of the symbol related to previous error)
+Compilation failed: 1 error(s), 0 warnings
+
+Expected Results:
+
+No error. (Thanks to loriel on #mono for checking this on csc.)
+
+Additional Information:
+
+IronPython 2.0a1 source triggers this bug.
+(PythonExtensionTypeAttribute inherits from ExtensionTypeAttribute.)
+
+One workaround is to specify AllowMultiple flag in subclasses again.
+
++[AttributeUsage(AttributeTargets.All, AllowMultiple=true)]
+ public class SubAttribute : MyAttribute {}


More information about the mono-bugs mailing list