[Mono-bugs] [Bug 660260] New: A static method is inaccessible from a nested type with explicit generic args.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Dec 17 13:05:31 EST 2010


https://bugzilla.novell.com/show_bug.cgi?id=660260

https://bugzilla.novell.com/show_bug.cgi?id=660260#c0


           Summary: A static method is inaccessible from a nested type
                    with explicit generic args.
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.8.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: C#
        AssignedTo: msafar at novell.com
        ReportedBy: p.bludov at wi2geo.ru
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Steps to reproduce the problem:

using System;

namespace MonoTest
{
    public class A<TA>
    {
        class B<TB>
        {
            static void foo()
            {
            }

            class C
            {
                static void bar()
                {
                    foo(); // ok
                    B<C>.foo(); // is inaccessible due to its protection level
                    A<C>.B<C>.foo(); // is inaccessible due to its protection
level
                }
            }
        }
    }

    class Program
    {
        static void Main()
        {
        }
    }
}

Actual Results:
test.cs(17,94): error CS0122: `MonoTest.A<TA>.B<MonoTest.A<TA>.B<TB>.C>.foo()'
is inaccessible due to its protection level
test.cs(17,195): error CS0122:
`MonoTest.A<MonoTest.A<TA>.B<TB>.C>.B<MonoTest.A<TA>.B<TB>.C>.foo()' is
inaccessible due to its protection level


Additional Information:
This snipped was extracted from
http://bl-toolkit.googlecode.com/svn/trunk/Source/Mapping/ExpressionMapper.cs

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list