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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=82814 --- shadow/82814 2007-09-12 04:34:26.000000000 -0400 +++ shadow/82814.tmp.15627 2007-09-12 04:34:26.000000000 -0400 @@ -0,0 +1,55 @@ +Bug#: 82814 +Product: Mono: Class Libraries +Version: 1.2 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Blocker +Component: Cecil +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Cannot distinguish CustomAttribute values that are Types from Strings + +Description of Problem: + +It does not appear to be possible to distinguish CustomAttribute values +that are Types from those that are Strings. The metadata gets parsed from +the original file correctly but when it is copied to the CustomAttribute +object this information is lost. From the perspective of the user, the +attribute value is now just a string that happens to be a type name. + +Worse, I believe there will be problems with round-trip manipulation of +assemblies with attributes that have object[] arrays containing Types. In +this case, the code in ReflectionWriter.CreateElem calls GetObjectTypeName +to determine the type of each value. That will fail for Type values +because they're actually represented as strings by the reader right now. + +I think it would be best for the metadata reader to parse type names to +TypeReference objects and store those in the CustomAttribute instead. +Likewise the metadata writer should check for the presence of TypeReference +(and possible Type also) and do the right thing. + + +Steps to reproduce the problem: + +1. Read in an assembly with an attribute value of type Type. + +Actual Results: + +The CustomAttribute object describing the attribute contains the type's +name as a string in the constructor values, field values, or property +values array, wherever it happened to be defined. + +Expected Results: + +It should pass the type as a TypeReference or something similarly unambiguous. + +How often does this happen? + +Always. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
