eclipse-aspectj / aspectj

Other
291 stars 84 forks source link

Enable type parameter traversal in exact type patterns #221

Closed kriegaex closed 5 months ago

kriegaex commented 1 year ago

When a WildTypePattern in converted into an ExactTypePattern, type variables are currently ignored. I.e., the exact type pattern will have no type variable list. The only existing ExactTypePattern constructor does not even take a TypePatternList parameter and hence also not pass it on to the super constructor.

Consequently, when traversing the corresponding node with a pattern visitor, e.g. in order to also check type parameters for something illegal like void[] or primitive types in general - see also #216, #217 - with an empty type pattern list there will be no traversal and therefore no check at all. I would almost consider this a bug.

kriegaex commented 1 year ago

I did not look into this for a while, being busy with non-AspectJ stuff. Reminder to myself or anyone else implementing this: Writing additional information into a CompressingDataOutputStream also means that later it must be read from a VersionedDataInputStream, i.e. older AspectJ versions would trip over unexpected additional data in the latter. That would mean either of