Given instance method
“void f() {
int var = 6;
Function<Integer, Integer> myFunc = (x) - {return var; };
}“`
var
is underlined (only once – inside lambda).
Usually, if I really reassign (say writevar = 7
after var = 6
) – both occurrencies of var are underlined.
But in my case only occurrence inside lambda is underlined.
Could you please provide any comments concerning such IDE behavior?
I expected that there is no reassignment here and so var would not be underlined at all!
New contributor