[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pnet-developers] Re: Possible misinterpretation of 'protected inter
From: |
Rich Baumann |
Subject: |
Re: [Pnet-developers] Re: Possible misinterpretation of 'protected internal' |
Date: |
Thu, 09 Sep 2004 02:19:29 -0400 |
On Tue, 2004-09-07 at 10:47, Carl-Adam Brengesjo wrote:
> This reveals that it's a bug in csc rather than in cscc.
> csc seems to interprent "protected internal" to allow access to the
> member in the same assembly as the derived class also.
> X is in the same assembly as B, and foo() is marked `internal', therefor
> allow access to foo() from B.
> Look on the testcase provided, X.SomeMethod() is allowed by csc, but not
> X.SomeMethod2(). This seems to me to be a clearly incorrect behaviour of
> csc as X does not belong to the same assembly as A.
X is a nested class of B, so it should be able to access all private and
protected members of B. If X were a separate class, external to B, then
a compile error would be appropriate for the attempted use of the
protected method.
Rich