-
Notifications
You must be signed in to change notification settings - Fork 782
Open
Description
What version of Error Prone are you using?
Master
Does this issue reproduce with the latest release?
Yes
What did you do?
class Foo {
private String testID;
static final class Inner {
Inner(String testId) {}
}
}What did you expect to see?
No warning.
What did you see instead?
Foo.java:4: warning: [InconsistentCapitalization] Found the field 'testID' with the same name as the parameter 'testId' but with different capitalization.
Inner(String testId) {}
^
(see https://errorprone.info/bugpattern/InconsistentCapitalization.md)
Did you mean 'Inner(String testID) {}'?
According to the docs the check is supposed to find "two or more variables under the same scope that differ only in capitalization." The word "under" is a bit ambiguous. If it means "in the same scope," then the above may be a bug as the names are not in the same scope. If "under" means something else, might be good to clarify.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels