[Mono-bugs] [Bug 22666] New - Binary operators not defined for bool type.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
28 Mar 2002 03:32:16 -0000


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 dihlewis@yahoo.co.uk.

http://bugzilla.ximian.com/show_bug.cgi?id=22666

--- shadow/22666	Wed Mar 27 22:32:16 2002
+++ shadow/22666.tmp.26375	Wed Mar 27 22:32:16 2002
@@ -0,0 +1,33 @@
+Bug#: 22666
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: dihlewis@yahoo.co.uk               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Binary operators not defined for bool type.
+
+The logical binary operators |, & and ^ can be used with bool operands. 
+(Note their semantics are different from the conditional ops || and &&). 
+The following code fails to compile:
+
+
+
+class Test {
+        public static void Main () {
+                bool b;
+
+                b = true | false;
+                b = true & false;
+                b = true ^ false;
+        }
+}