[Mono-dev] Bitwise operator |

Jonel Rienton jonel at rientongroup.com
Tue Jan 10 11:32:09 EST 2006


Hi guys,

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


Jonel Rienton

--
I know not english well, but I know 9 computer languaes. 




More information about the Mono-devel-list mailing list