Conversation
- ParameterGroups are gone, with every signature now effectively containing a required leading group and an optional vararg trailing group. The prior flexibility made working them easy to get wrong, for example in the matching logic which would have been incorrect for leading vararg groups. - Inject previously contained 2 optional groups (the target's params and the captured locals) but this was in fact incorrect, since the captured params are required if we want to capture any locals, so it is now (better) represented as 2 separate signature options. - The distinction between `WARN_IF_ABSENT` and `ERROR_IF_ABSENT` is entirely removed. It was effectively unused since it only applied to captured Inject locals, which are varargs and therefore never "absent" (a separate inspection handles unused LocalCapture). - ModifyArgs is in fact all-or-nothing wrt capturing the target parameters, and this is now reflected.
Not sure why these are there, Mixin doesn't allow them.
It does not work and cannot ever work.
…s specified, and supporting wildcard matches
We always allow this.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overhauls InvalidInjectorMethodSignatureInspection and related infrastructure. Apologies for this not being broken up into digestible commits, there were simply too many interleaved changes.
I appreciate that this will be tricky to review, the complex logic is documented where I felt it was needed and lots of new tests are provided.
The general changes are
@Coercewhere possible and prioritising the most specific supertype when it is not possible. Additionally, ModifyVariable and ModifyArg suggestions prioritise the handler's existing return type where available..classliterals, Inject allowing captured locals without the target method's parameters, WrapMethod not requiring exact staticness