[Mono-dev] Bitwise operator |

Marek Safar marek.safar at seznam.cz
Tue Jan 10 13:07:44 EST 2006


Hello Jonel,
> If I try to compile the following code in Mono, 
>
> using System;
>
> namespace Test
> {
>     public class TestBit
>     {
>         public static void Main()
>         {
>             Console.WriteLine(false | false);
>         }
>     }
> }
>
> I get 
>
> jonel at edison:~$ mcs bit.cs
> bit.cs(9,22): error CS0031: Constant value `bool' cannot be converted to a
> `int'
> bit.cs(9,22): error CS0031: Constant value `bool' cannot be converted to a
> `int'
> Compilation failed: 2 error(s), 0 warnings
> jonel at edison:~$
>
>
> This behavior is different if I compile it using Microsoft's csc, it
> compiles fine with no error. However, if I run the csc compiled bit.exe in
> Mono, it does run. Is this a bug or just a different implementation, (or is
> it just too early and not enough coffee for me to code)? I am testing this
> with mono/mcs version 1.1.12
>   
Please report this as Mono C# compiler bug.

Thanks
Marek





More information about the Mono-devel-list mailing list