Bugzilla – Bug 317016
crazy boolean in mcs and gmcs (head and 1.05)
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by spigaz@gmail.com 2005-01-26 16:57:54 MST ---- Description of Problem: In some strange circunstance, a bool value, given true to the method, is recived inside the method as false. In the example, the v4 is always given true, but is always recived as false. Steps to reproduce the problem: 1. Insert into a file: namespace FLMID.Bugs.BoolOne { public interface IB { void Add(bool v1, bool v2, uint v3, bool v4); } public class A { public void Add(bool v1, bool v2, uint v3, bool v4) { System.Console.WriteLine(v4); } } public class B : A, IB { } public class Test { public static void Main(string[] args) { IB aux = new B(); aux.Add(false, false, 0, true); } } } 2. Compile 3. Execute Actual Results: False Expected Results: True How often does this happen? Always Additional Information: Tested in .NET 2.0 (Beta) and it worked fine If you define a method in the subclasse like this: (and put the base class' virtual) public override void Add(bool v1, bool v2, uint v3, bool v4) { base.Add(v1, v2, v3, v4); } It will work fine. So far this is the only workarround that I have found... ---- Additional Comments From vargaz@gmail.com 2005-01-26 17:04:14 MST ---- *** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO71742 *** ---- Additional Comments From spigaz@gmail.com 2005-01-26 17:08:22 MST ---- The assembly from .NET 2.0 works fine on mono. ---- Additional Comments From miguel@ximian.com 2005-01-29 14:09:18 MST ---- Fixed on SVN Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Gentoo 2.6.10</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other". This bug was marked DUPLICATE in the database it was moved from. Changing resolution to "MOVED"