[Mono-bugs] [Bug 77006][Nor] New - exception when trying to compile
partial class which overrides Equals and GetHashCode
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Dec 15 07:51:04 EST 2005
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 agiuglea at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=77006
--- shadow/77006 2005-12-15 07:51:04.000000000 -0500
+++ shadow/77006.tmp.18707 2005-12-15 07:51:04.000000000 -0500
@@ -0,0 +1,61 @@
+Bug#: 77006
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details: gentoo
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: agiuglea at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: exception when trying to compile partial class which overrides Equals and GetHashCode
+
+Description of Problem:
+
+Mono C# compiler throws System.NullReferenceException.
+
+Steps to reproduce the problem:
+
+Override Equals and/or GetHashCode methods in a partial class.
+Example:
+
+namespace Test{
+ public partial class Test{
+ public override bool Equals(Object obj){
+ return true;
+ }
+
+ public override int GetHashCode(){
+ return 1;
+ }
+ }
+}
+
+Actual Results:
+
+Unhandled Exception: System.NullReferenceException: Object reference not set to
+an instance of an object
+in <0x00479> Mono.CSharp.MethodCore:CheckBase ()
+in <0x00010> Mono.CSharp.Method:CheckBase ()
+in <0x00162> Mono.CSharp.Method:Define ()
+in <0x00059>
+Mono.CSharp.TypeContainer+MemberCoreArrayList:DefineContainerMembers ()
+in <0x00010>
+Mono.CSharp.TypeContainer+MethodArrayList:DefineContainerMembers ()
+in <0x00014> Mono.CSharp.TypeContainer:DefineContainerMembers
+(Mono.CSharp.MemberCoreArrayList mcal)
+in <0x005b4> Mono.CSharp.TypeContainer:DoDefineMembers ()
+in <0x00050> Mono.CSharp.TypeContainer:DefineMembers
+(Mono.CSharp.TypeContainer container)
+in <0x0024c> Mono.CSharp.RootContext:PopulateTypes ()
+in <0x00b52> Mono.CSharp.Driver:MainDriver (System.String[] args)
+in <0x0001f> Mono.CSharp.Driver:Main (System.String[] args)
+
+How often does this happen?
+Only seen in partial classes.
More information about the mono-bugs
mailing list