"Find Usages" doesn't find when a variable is initialized outside of constructor

For example

public class A {
     private int foo = 0;
     public A () {

     }
}

It doesn't find the usage of foo where it is being set to 0. Is this a bug or am I using Find Usages wrong?

0
3 comments
Avatar
Permanently deleted user

This is expected behavior..foo is only set, but never used in your code.

0
Avatar
Permanently deleted user

That was just me being lazy. In my actual code, foo is actually used.

0

The declaration of a variable or field is not considered a usage.

0

Please sign in to leave a comment.