Bug 318264 (MONO75261) - [GMCS] a little bit more type inference should be performed by gmcs
Summary: [GMCS] a little bit more type inference should be performed by gmcs
Status: RESOLVED FIXED
Alias: MONO75261
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.0
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-14 19:09 UTC by Kamil Skalski
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:21:12 UTC


---- Reported by nazgul@omega.pl 2005-06-14 12:09:11 MST ----

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:



---- Additional Comments From martin@ximian.com 2005-06-20 12:01:16 MST ----

Fixed in SVN.


Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>PLD linux, mono from svn (13.07.2005)</cf_op_sys_details>
Unknown operating system unknown. Setting to default OS "Other".