[Mono-bugs] [Bug 56300][Nor] New - Wrong generation of DefaultMemberAttribute's
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 31 Mar 2004 13:01:22 -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 classdevelopment@a-softtech.com.
http://bugzilla.ximian.com/show_bug.cgi?id=56300
--- shadow/56300 2004-03-31 13:01:22.000000000 -0500
+++ shadow/56300.tmp.19302 2004-03-31 13:01:22.000000000 -0500
@@ -0,0 +1,88 @@
+Bug#: 56300
+Product: Mono: Compilers
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: ClassDevelopment@A-SoftTech.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Wrong generation of DefaultMemberAttribute's
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:
+mcs (or Reflection.Emit?) is creating DefaultMemberAttributes in cases
+when it shouldn't.
+By default this Attribute is added to a class if this class contains
+a "this" indexer. However it should NOT be added if the indexer is a
+private interface implementation.
+E.g. CollectionBase.cs contains:
+ object IList.this[int index] {
+
+ get { return InnerList[index]; }
+
+ set {
+
+ if (index < 0 || index >= InnerList.Count)
+
+ throw new
+ArgumentOutOfRangeException ("index");
+
+
+
+ object oldValue;
+
+ // make sure we have been given a valid
+value
+
+ OnValidate(value);
+
+ // save a reference to the object that is
+in the list now
+
+ oldValue = InnerList[index];
+
+
+
+ OnSet(index, oldValue, value);
+
+ InnerList[index] = value;
+
+ try {
+
+ OnSetComplete(index, oldValue,
+value);
+
+ } catch {
+
+ InnerList[index] = oldValue;
+
+ throw;
+
+ }
+
+ }
+
+ }
+because of that the class automatically get the DefaultMemberAttribute
+under MONO.
+
+Actual Results:
+adds attribute for private interface implementations
+
+Expected Results:
+should NOT add attribute for private interface implementations (csc does
+not add it)
+
+How often does this happen?
+always
+
+Additional Information: