[Mono-bugs] [Bug 68711][Nor] Changed - implicit casts not transitive
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 3 Jan 2005 06:14:44 -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 duncan@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=68711
--- shadow/68711 2005-01-03 05:59:39.000000000 -0500
+++ shadow/68711.tmp.11266 2005-01-03 06:14:44.000000000 -0500
@@ -1,12 +1,12 @@
Bug#: 68711
Product: Mono: Compilers
Version: 1.0
OS: other
OS Details:
-Status: NEW
+Status: ASSIGNED
Resolution:
Severity: Unknown
Priority: Normal
Component: C#
AssignedTo: duncan@ximian.com
ReportedBy: dan@clevermachine.com
@@ -116,6 +116,35 @@
* convert.cs (UserDefinedConversion): Call UserDefinedConversion
recursively to find all possible conversions, because a UserCast
might be necessary to cast original_source into most_specific_source.
This fixes #68711.
+
+------- Additional Comments From duncan@ximian.com 2005-01-03 06:14 -------
+Hohum, so I reread the bug report.
+
+My patch works if I keep:
+ SuperDecimal sd = i;
+
+polysemy:~/bugs $ mcs 68711.cs
+ImplicitConversionStandard from Int32 to SuperDecimal
+ImplicitConversionStandard from Int32 to Decimal
+ImplicitConversionStandard from Int32 to Int32
+68711.cs(18) warning CS0219: The variable 'sd' is assigned but its
+value is never used
+Compilation succeeded - 1 warning(s)
+
+If I change that to:
+ SuperDecimal sd = (SuperDecimal) i;
+
+I get:
+polysemy:~/bugs $ mcs 68711.cs
+ImplicitConversionStandard: from Int32 to SuperDecimal
+ImplicitConversionStandard: from Int32 to Decimal
+ImplicitConversionStandard: from Int32 to Decimal
+68711.cs(18) error CS0030: Cannot convert type 'int' to 'decimal'
+ImplicitConversionStandard: from Int32 to Int32
+Compilation failed: 1 error(s), 0 warnings
+
+So It does work eventually, but I need to supress that CS0030 error in
+this case.