Bug 92340 - private ITD's not visible to nested aspect
Summary: private ITD's not visible to nested aspect
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.5.0M2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-22 03:15 EDT by Wes Isberg CLA
Modified: 2005-04-22 03:15 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wes Isberg CLA 2005-04-22 03:15:46 EDT
I noticed that private ITD's are not visible to a nested aspect or class, unlike
private aspect members.  The following causes a compiler error:

public class Outer {
    static class C {        
    }
    static aspect Nested {
        private static int I;
        private static int C.i;
        static aspect NestedNested {
            void m() {
                C.i = 1; // fails
                I = 1;   // ok
            }
        }
    }
}

If this can't be made equivalent to ordinary private members, perhaps the
semantics section should change:

-- from
So a private inter-type member is visible only from code that is defined within
the declaring aspect

-- to
A private inter-type member is visible only from code within the declaring
aspect.  Further, unlike other private members, it is not visible to types
nested within the declaring aspect.

(Also, as a language issue, this might be an "info" bug.)