2002-12-07 Ravi Pratap <ravi@ximian.com>
authorRavi Pratap M <ravi@mono-cvs.ximian.com>
Sun, 8 Dec 2002 07:27:54 +0000 (07:27 -0000)
committerRavi Pratap M <ravi@mono-cvs.ximian.com>
Sun, 8 Dec 2002 07:27:54 +0000 (07:27 -0000)
commitd2ddb6847f32db4e725eb92aaed8326fdc0decc4
tree4233dc99dd12b384bbb12c534dd889e9dc6126c3
parentd22c7d62bb8ad62f00097e77756312d26a6ee390
2002-12-07  Ravi Pratap  <ravi@ximian.com>

* attribute.cs (Attribute.ApplyAttributes) : Keep track of which attribute
types have been emitted for a given element and flag an error
if something which does not have AllowMultiple set is used more
than once.

* typemanager.cs (RegisterAttributeAllowMultiple): Keep track of
attribute types and their corresponding AllowMultiple properties

(AreMultipleAllowed): Check the property for a given type.

* attribute.cs (Attribute.ApplyAttributes): Register the AllowMultiple
property in the case we have a TypeContainer.

(Attributes.AddAttribute): Detect duplicates and just skip on
adding them. This trivial fix catches a pretty gross error in our
attribute emission - global attributes were being emitted twice!

Bugzilla bug #33187 is now fixed.

svn path=/trunk/mcs/; revision=9440
mcs/mcs/ChangeLog
mcs/mcs/attribute.cs
mcs/mcs/cs-parser.jay
mcs/mcs/typemanager.cs