[Mono-bugs] [Bug 48679][Maj] New - Unboxed bool is neither true nor false

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 21 Sep 2003 22:01:21 -0400 (EDT)


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 bmaurer@users.sf.net.

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

--- shadow/48679	2003-09-21 22:01:21.000000000 -0400
+++ shadow/48679.tmp.18451	2003-09-21 22:01:21.000000000 -0400
@@ -0,0 +1,54 @@
+Bug#: 48679
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Unboxed bool is neither true nor false
+
+Description of Problem:
+Somehow, it is possible to get a value that equals neither true nor false.
+
+Steps to reproduce the problem:using System;
+using System.Xml;
+using System.Xml.XPath;
+
+public class T {
+	
+	static void Main ()
+	{
+		XPathNavigator navigator = new XmlDocument ().CreateNavigator ();
+		object val = navigator.Evaluate ("0>=0");
+		bool b = (bool) val;
+		Console.WriteLine (true == b);
+		Console.WriteLine (false == b);
+		Console.WriteLine (b);
+	}
+}
+
+
+Actual Results:
+[benm@Ben test]$ mono t.exe
+False
+False
+True
+
+Expected Results:
+[benm@Ben test]$ mint t.exe
+True
+False
+True
+
+
+How often does this happen? 
+Always