[Mono-bugs] [Bug 80714][Min] New - operator == on struct and null causes error

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Feb 3 13:07:57 EST 2007

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 marek.sieradzki at gmail.com.


--- shadow/80714	2007-02-03 13:07:57.000000000 -0500
+++ shadow/80714.tmp.27805	2007-02-03 13:07:57.000000000 -0500
@@ -0,0 +1,36 @@
+Bug#: 80714
+Product: Mono: Compilers
+Version: 1.2
+OS Details: 
+Status: NEW   
+Priority: Minor
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: marek.sieradzki at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: operator == on struct and null causes error
+Description of Problem:
+Comparison between a struct (not nullable) and null causes compilation error.
+Steps to reproduce the problem:
+1. Compile attached test case.
+Actual Results:
+struct.cs(18,22): error CS0019: Operator `==' cannot be applied to operands
+of type `A' and `null'
+Expected Results:
+Compilation succeeded (not really sure because it's such a weird case)
+How often does this happen? 
+Additional Information:
+Compiled code prints 'false' with CSC 2.0

More information about the mono-bugs mailing list