Bugzilla – Bug 320766
[GMCS] incorrect CS1502/CS1503 - gmcs fails to resolve the type of a static member in a nested class.
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by atsushi@ximian.com 2006-04-05 01:30:49 MST ---- For the following code example, gmcs reports CS1502/CS1503 while it should not. public class Test { public void Foo (G<int> c) {} void Bar () { Foo (G<int>.Instance); } // When it goes outside, there is no error. public class G<T> { public static G<T> Instance; } } Steps to reproduce the problem: 1. 2. 3. Actual Results: g.cs(7,3): error CS1502: The best overloaded method match for `Test.Foo(Test.G<int>)' has some invalid arguments g.cs(7,3): error CS1503: Argument 1: Cannot convert from `Test.G<T>' to `Test.G<int>' Expected Results: no CS1502/CS1503 error. How often does this happen? consistently. Additional Information: If the referenced type is not nested, it compiles fine. If the referenced member is not static, it compiles fine. ---- Additional Comments From martin@ximian.com 2006-06-16 14:02:35 MST ---- Fixed in SVN. Unknown operating system unknown. Setting to default OS "Other".