[Mono-bugs] [Bug 61055][Min] Changed - error cs0172: cant compute type of conditional expr

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 2 Jul 2004 21:54:48 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by thlsmith@iprimus.com.au.

http://bugzilla.ximian.com/show_bug.cgi?id=61055

--- shadow/61055	2004-07-02 07:17:14.000000000 -0400
+++ shadow/61055.tmp.26134	2004-07-02 21:54:48.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 61055
 Product: Mono: Compilers
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Minor
 Component: C#
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: thlsmith@iprimus.com.au               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -27,6 +27,15 @@
 
 mcs gives the following error for the above code
 c__Parser.cs(10) error CS0172: Can not compute type of conditional
 expression as `short' and `int' convert implicitly to each other
 
 I'm using mcs version 0.96.0.0
+
+------- Additional Comments From thlsmith@iprimus.com.au  2004-07-02 21:54 -------
+This problem with the preceding code is that the '0' literal at the
+end of the conditional expression is given the type int and requires
+an explicit cast of short.
+
+Can't integer literals be implicitly converted to shorts provided
+their in the appropriate range?
+