[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]Accessing parent class members from nested classes
From: |
Rhys Weatherley |
Subject: |
Re: [DotGNU]Accessing parent class members from nested classes |
Date: |
Tue, 13 Aug 2002 08:48:52 +1000 |
Gopal V wrote:
>
> Hi Rhys,
> Seems like a bug in the verifier for accessing the parent
> class members from a nested class ...
Nope. A bug in the compiler. That code should not have
compiled at all. It is in error.
The "foo" variable is not "static", so it cannot be accessed
from within B unless B inherits from A, which it doesn't.
If you add "static" to the declaration, or access "foo"
relative to an instance of A (i.e. "a.foo"), the code runs
fine with no verifier errors.
MS'es compiler gives an error on this code. I'll track
down why cscc didn't.
> PS: /me marks up 2 bugs for emeow-v2 ... great going !..
/me marks up two bug fixes shot down because they are wrong.
Sorry.
Cheers,
Rhys.