Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable type parameter traversal in exact type patterns #221

Closed
kriegaex opened this issue Jan 30, 2023 · 1 comment · Fixed by #222
Closed

Enable type parameter traversal in exact type patterns #221

kriegaex opened this issue Jan 30, 2023 · 1 comment · Fixed by #222
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@kriegaex
Copy link
Contributor

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 kriegaex added the enhancement New feature or request label Jan 30, 2023
@kriegaex kriegaex self-assigned this Jan 30, 2023
kriegaex added a commit that referenced this issue Jan 30, 2023
@kriegaex kriegaex linked a pull request Jan 30, 2023 that will close this issue
@kriegaex
Copy link
Contributor Author

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

kriegaex added a commit that referenced this issue Apr 11, 2024
kriegaex added a commit that referenced this issue Apr 11, 2024
Due to the latest improvements, an error which was previously not thrown
unexpectedly according to a source code comment in test aspect
ParameterizedTypesInAnnotationPatterns.aj is now thrown for this kind
of pointcut:

  staticinitialization(@(Foo || List<String>) String)

Now the compiler correctly says:

  no static initialization join points for parameterized types,
  use raw type instead

Relates to #221.

Signed-off-by: Alexander Kriegisch <[email protected]>
@kriegaex kriegaex added this to the 1.9.22.1 milestone Apr 12, 2024
kriegaex added a commit that referenced this issue Apr 12, 2024
kriegaex added a commit that referenced this issue Apr 12, 2024
Due to the latest improvements, an error which was previously not thrown
unexpectedly according to a source code comment in test aspect
ParameterizedTypesInAnnotationPatterns.aj is now thrown for this kind
of pointcut:

  staticinitialization(@(Foo || List<String>) String)

Now the compiler correctly says:

  no static initialization join points for parameterized types,
  use raw type instead

Relates to #221.

Signed-off-by: Alexander Kriegisch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant