[Mono-bugs] [Bug 75261][Wis] New - [GMCS] a little bit more type
inference should be performed by gmcs
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Jun 14 12:09:11 EDT 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 nazgul at omega.pl.
http://bugzilla.ximian.com/show_bug.cgi?id=75261
--- shadow/75261 2005-06-14 12:09:11.000000000 -0400
+++ shadow/75261.tmp.3997 2005-06-14 12:09:11.000000000 -0400
@@ -0,0 +1,66 @@
+Bug#: 75261
+Product: Mono: Compilers
+Version: 1.0
+OS:
+OS Details: PLD linux, mono from svn (13.07.2005)
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: nazgul at omega.pl
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [GMCS] a little bit more type inference should be performed by gmcs
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+csc 2.0 beta 2 understand code demanding a slightly more type inference,
+than gmcs do currently
+
+Steps to reproduce the problem:
+1. Try to compile following code
+
+
+class list <A> {
+ public class Cons <T> : list <T> { }
+ public class Nil <T> : list <T> { }
+}
+
+class C {
+ public static void Rev<T> (list <T> y) {
+ if (y is list<object>.Cons<T>)
+ System.Console.WriteLine ("Cons");
+ if (y is list<object>.Nil<T>)
+ System.Console.WriteLine ("Nil");
+ }
+}
+class M {
+ static void Main () {
+ C.Rev (new list<object>.Cons <string> ());
+ C.Rev (new list<object>.Nil <string> ());
+ }
+}
+
+
+2.
+3.
+
+Actual Results:
+t.cs(24) error CS0411: The type arguments for method `Rev' cannot be
+infered from the usage. Try specifying the type arguments explicitly.
+abla
+t.cs(25) error CS0411: The type arguments for method `Rev' cannot be
+infered from the usage. Try specifying the type arguments explicitly.
+
+Expected Results:
+clear compiler
+
+How often does this happen?
+Always
+
+Additional Information:
More information about the mono-bugs
mailing list