http://bugzilla.novell.com/show_bug.cgi?id=564088
http://bugzilla.novell.com/show_bug.cgi?id=564088#c0 Summary: CS0172 incorrectly reported for conditional expression when implicit conversion is available. Classification: Mono Product: Mono: Compilers Version: 2.6.x Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: C# AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- Description of Problem: CS0172 incorrectly reported for a pair of types when one can be implicitly promoted to the other. Steps to reproduce the problem: Compile the following two lines of C# code: byte x = 4; byte a = (byte)(true ? x : 0); Actual Results: CS0172 reported on the second line. Expected Results: Code should compile. This compiles correctly with MS's C# compiler. The byte type (x variable) should be promoted to an integer, so that both types in the conditional are the same. How often does this happen? Every time. Additional Information: -- 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
