[Mono-bugs] [Bug 72899][Min] Changed - Compiler message: "'short' and 'int' implicitly convert to each other"
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 23 Feb 2005 09:42:12 -0500 (EST)
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 rharinath@novell.com.
http://bugzilla.ximian.com/show_bug.cgi?id=72899
--- shadow/72899 2005-02-23 05:47:23.000000000 -0500
+++ shadow/72899.tmp.9151 2005-02-23 09:42:12.000000000 -0500
@@ -1,15 +1,15 @@
Bug#: 72899
Product: Mono: Compilers
Version: 1.1
-OS:
+OS: unknown
OS Details: Fedora Core 3; Mono-1.1.4 build from source
-Status: NEW
-Resolution:
-Severity:
-Priority: Normal
+Status: RESOLVED
+Resolution: NOTABUG
+Severity: Unknown
+Priority: Minor
Component: C#
AssignedTo: mono-bugs@ximian.com
ReportedBy: dezelin@gmail.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
URL:
@@ -67,6 +67,20 @@
short s = 5;
int i = 345;
short flag = (s < i) ? 0 : s;
}
}
}
+
+------- Additional Comments From rharinath@novell.com 2005-02-23 09:42 -------
+I compiled your testcase with Microsoft's CSC -- both the .NET 1.1 and
+the .NET 2.0beta versions. They both report an error similar to the
+above.
+
+The type of the integer literal '0' is 'int' (section 9.4.4.2).
+However, there exists an implicit conversion from a constant
+expression of type 'int' to 'short' (section 13.1.6). There exists an
+implicit conversion from 'short' to 'int' (section 13.1.2).
+
+Thus, according to section 14.12, this is ambiguous. The error
+message is somewhat misleading.
+