-
Notifications
You must be signed in to change notification settings - Fork 2k
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
@BindsInstance on parameter triggering ISE for missing binding #1464
Comments
I did see that the test for adding this feature is very nearly exactly the same thing as above, so I'm not sure why it's failing. |
I think I've figured out why it's failing, and it's pretty dumb (and is based on a bad assumption on our part that didn't get caught in the testing). The problem is:
As a workaround, giving the parameter the same name as the method works, but obviously that should not be required. |
…ter caused a failure in codegen if the parameter had a different name than the setter method. Fixes #1464 RELNOTES=Fixed an issue where `@BindsInstance` on a Builder setter method's parameter caused a failure in codegen if the parameter had a different name than the method itself (#1464). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=241596307
(Note: this is fixed in 2.22.1) |
The code is
Moving
@BindsInstance
from the parameter to the method makes the error go away. I actually caught this prior to 2.22 but I thought it was user error. I've only since discovered that (I think) it's not my fault 😁The text was updated successfully, but these errors were encountered: