Summary: | Compiler error when not explicitly declaring an aspect nested in an interface as static | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Alexander Kriegisch <Alexander> |
Component: | Compiler | Assignee: | aspectj inbox <aspectj-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | aclement |
Version: | 1.9.5 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows 10 | ||
Whiteboard: |
Description
Alexander Kriegisch
2021-02-10 20:42:24 EST
I forgot to mention that if I declare a nested class inside the interface, there is no need to explicitly use 'static', the compiler only dies when I omit the keyword for a nested aspect. On a side note, I created this issue on Bugzilla, just because the AJDT error dialog suggested me to and because Bugzilla for AspectJ still permits to create new issues. I think like this we will have new issues both here and on GitHub forever. If you do not mind, then so be it. ;-) This ought to be a reasonable issue to dig into (if you want to?) if the problem is that we simply aren't implicitly setting the static bit for an aspect inside an interface where there is code setting it implicitly for a class. I might start looking around TheOriginalJDTParserClass.consumeCLassOrRecordHeaderName1 to see if the point where we build the type declaration we are taking something like that into account (am I inside an interface). And then are we missing that when consuming an aspect header name. If not there I'd be setting a breakpoint on the SourceTypeBinding and seeing when the modifiers get the static bit set (this is all assuming a test case that is doing it for a class inside an interface). Then wherever that is being done, mirror that behaviour in the aspect codepath. |