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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=78018 --- shadow/78018 2006-04-05 01:30:50.000000000 -0400 +++ shadow/78018.tmp.739 2006-04-05 01:30:50.000000000 -0400 @@ -0,0 +1,62 @@ +Bug#: 78018 +Product: Mono: Compilers +Version: 1.1 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: C# +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: [GMCS] incorrect CS1502/CS1503 - gmcs fails to resolve the type of a static member in a nested class. + +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. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
