-
Notifications
You must be signed in to change notification settings - Fork 422
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
Typo in error message from AbstractCommandSpecProcessor#extractTypedMember(Element, String)? #1476
Comments
Thank you for raising this! |
I had a quick look, and it seems that I suspect that the I did not look in more detail, however. I am going to leave this error message as it is for now; the error message itself is correct (for example, if a class is annotated with |
I got the error when I annotated a Kotlin primary constructor parameter with
It's saying that |
Oh I see, interesting. So this is related to #1195. You could try uncommenting the Also, (and this may not be important, but) |
Yep, I saw this while investigating #1195. I'm not trying to change this now to implement #1195. The current error output must be incorrect, since it says that the annotation can be processed on method parameters, but then says it cannot be processed on Unless I've completely missed something… |
Yes, good point. |
I think there's another typo in the error message from
AbstractCommandSpecProcessor#extractTypedMember(Element, String)
.It currently outputs:
"Can only process %s annotations on fields, methods and method parameters, not on %s"
But the
element.getKind() == ElementKind.PARAMETER
check is commented, so I think the correct message should be:"Can only process %s annotations on fields and methods, not on %s"
Or maybe the
element.getKind() == ElementKind.PARAMETER
should be uncommented…As an aside, I also think the code should use a
switch
statement instead of chainedif
s.I can make a PR, but just wanted to check first.
The text was updated successfully, but these errors were encountered: