[Mono-bugs] [Bug 389272] New: PtrHashtable fails due to a alledged bug in TypeBuilder. GetHashCode (original Microsoft .NET Framework 2.0 SP1)
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon May 12 05:56:00 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=389272
Summary: PtrHashtable fails due to a alledged bug in
TypeBuilder.GetHashCode (original Microsoft .NET
Framework 2.0 SP1)
Product: Mono: Compilers
Version: 1.9.0
Platform: x86
OS/Version: Windows XP
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: mihailik at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: Other
Mono.CSharp.PtrHashtable
in support.cs ~333ln
Fails due to a alledged bug in TypeBuilder.GetHashCode (original Microsoft .NET
Framework 2.0 SP1)
for Enum type builders it throws InvalidOperationException 'Underlying type
information on enumeration is not specified.'
Proposed workaround is to add the following override to PtrHashtable:
#if MS_COMPATIBLE
protected override int GetHash(object key)
{
if (key is Type && ((Type)key).IsEnum)
{
return ((Type)key).FullName.GetHashCode();
}
return key.GetHashCode();
}
#endif
--
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.
More information about the mono-bugs
mailing list