[Mono-bugs] [Bug 322010] [GMCS] does not compile arithmetic operations requiring lifted conversion

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jul 22 13:51:08 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=322010

User msafar at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=322010#c1





--- Comment #1 from Marek Safar <msafar at novell.com>  2008-07-22 11:51:07 MDT ---
6.1.5 explains why it is allowed but some results are still unexpected

using System;

class Program
{
        static int Main ()
        {
                int? i1 = null + null; // CS0034: Operator '+' is ambiguous
                int? i2 = null * null; // OK
                int? i3 = null / null; // OK
                int? i5 = null % null; // OK
                int? i6 = null - null; // OK
                int? i7 = null ^ null; // CS0034: Operator '^' is ambiguous
                int? i8 = null & null; // CS0034: Operator '&' is ambiguous
                int? i9 = null >> 1; // OK

                bool? b = null > null; // OK
                bool? b2 = null < null; // OK

                return 0;
        }
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list