[Mono-bugs] [Bug 76625][Wis] New - [GMCS] CS0266: extra cast is
required from IFoo<T> to IFoo where IFoo<T> is IFoo
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Nov 3 07:13:30 EST 2005
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 atsushi at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=76625
--- shadow/76625 2005-11-03 07:13:29.000000000 -0500
+++ shadow/76625.tmp.3306 2005-11-03 07:13:29.000000000 -0500
@@ -0,0 +1,43 @@
+Bug#: 76625
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: atsushi at ximian.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [GMCS] CS0266: extra cast is required from IFoo<T> to IFoo where IFoo<T> is IFoo
+
+An extra cast is required from IFoo<T> to IFoo where IFoo<T> is IFoo.
+
+public interface IFoo { }
+public interface IFoo<T> : IFoo { }
+public class Test
+{
+ public IFoo GetFoo () { return GetFooGeneric<object> (); }
+
+ public IFoo<T> GetFooGeneric<T> () { return default (IFoo<T>); }
+}
+
+
+Actual Results:
+
+cast.cs(5,26): error CS0266: Cannot implicitly convert type
+`IFoo<System.Object>
+' to `IFoo'. An explicit conversion exists (are you missing a cast?)
+
+Expected Results:
+
+no CS0266 error
+
+How often does this happen?
+
+consistently.
More information about the mono-bugs
mailing list