The compiler will almost certainly never warn that, there’s really nothing wrong with it. An external linter could.
Note that it can also appear when you pass function as an argument to another function and there’s little you can do about naming in that case.