https://bugzilla.novell.com/show_bug.cgi?id=358566
Summary: System.CodeDom: Adding items to
CodeTypeReference.TypeArguments doesn't update BaseType
Product: Mono: Class Libraries
Version: 1.2.6
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Core
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
The following code creates an incorrect CodeTypeReference on Mono but not on
net.
private CodeTypeReference GetTypeRef()
{
CodeTypeReference result = new CodeTypeReference();
result.BaseType = "System.Nullable";
result.TypeArguments.Add(new CodeTypeReference(typeof(int)));
// <WORKAROUND>
//if (result.TypeArguments.Count > 0 && result.BaseType.IndexOf('`') == -1)
// result.BaseType += "`" + result.TypeArguments.Count;
// </WORKAROUND>
return result;
}
On .net when the TypeArguments member is modified, the BaseType is too. This
can be worked around by uncommenting the workaround.
Without the workaround, System.Nullable is generated in the source code instead
of System.Nullable<int>.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs