http://bugzilla.novell.com/show_bug.cgi?id=564088

http://bugzilla.novell.com/show_bug.cgi?id=564088#c1


Marek Safar <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Marek Safar <[email protected]> 2009-12-15 09:29:39 UTC ---
I think this is MS C# compiler bug, the conversion is ambiguous as `x' can be
converted to int (0) and literal 0 can be converted to byte.

There should be no type promotion to avoid this like this

var x = true ? x : 0;  // csc compiles this as int which I think is wrong as
your intentions are unclear, did you want to define int or byte ?

To write it correctly (as C# standard defines) use

byte a = true ? x : (byte) 0;

-- 
Configure bugmail: http://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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to