Bug 320766 (MONO78018) - [GMCS] incorrect CS1502/CS1503 - gmcs fails to resolve the type of a static member in a nested class.
Summary: [GMCS] incorrect CS1502/CS1503 - gmcs fails to resolve the type of a static m...
Status: RESOLVED FIXED
Alias: MONO78018
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-05 08:30 UTC by Atsushi Enomoto
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:54:07 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".