- A new ClassScope was being created for each annon inner class method / field,
which is incorrect.
- I reworked the AccessorMethodGeneration to compare scopes directly, since
I was missing anonymous classes completely.
- Fixes#274
- Provide a definite fix for casts. This allowed to remove a bunch of hacks.
- I had to change the grammar a bit... `(int)` is now a cast with a
PrimitiveType as child, not a Type with a nested PrimitiveType. This is due
to JavaCC completely ignoring whatever you place in the LOOKAHEAD in favor
of just looking the follow-up expression completely.
- Removing the hacks raised an issue with expression orders, caused also by JavaCC's
disregard to LOOKAHEAD contents
- This covers a ton of missing cases
- Fixes#246
- Fixes#247
- Fixes#248
- Notice `isNested` has been improved on `ASTClassOrInterfaceDeclaration`
to cover being nested in an annotation definition
- This resolves#1496
- There is still an outstanding false negative, which is down to a bug in
symbol table analysis, I'm leaving that out for the moment, and address it
on a separate PR.
- A bunch of closely related issues fixed:
- References to `this`, `super` and `Classname` were very badly resolved
(pointed to variables, methods, or nothing at all on empty classes)
- Annotations would not be registered by their parent scopes.
- Given an import on `a.Foo`, references to `Foo.Inner` should be qualified
as `a.Foo.Inner`.
- This fixes a couple of wrong missing classes.
- The test also brought to light another issue with resolvers that would fail
to resolve even a qualified inner class if not explicitly imported under
certain circumstances.
- There are certain cases where we know exactly what to look for, not needing
to brute force our way to inner classes. For those, use a direct approach.
Fixes#1448 ImmutableField Rule: Private field in inner class gives false positive[java] ImmutableField: Private field in inner class gives false positive with lambdas