Raise UnsupportedSyntax if a proc object is given as block-pass-argument
At present, users will see BlockTypeMismatch diagnostic when a proc object is passed as block-pass-argument. We'll usually see the diagnostic with &method idiom.
[1, 2, 3].map(&method(:puts))
But there is nothing to do from the user side because such a call is not invalid. It seems like a false positive.
This changes the diagnostic type for the case to UnsupportedSyntax. It notifies users that the source code is valid and that change is unnecessary.
refs: #149
Now, https://github.com/soutaro/steep/pull/1276 has been merged into the master. But this is still needed, I believe.
We still have the possibility of getting BlockTypeMismatch because #1276 only covers the case of &method(:name).
For example, the following code will cause the diagnostic:
meth = method(:puts)
[1, 2, 3].map(&meth)
block = proc { |n| n.to_s }
[1, 2, 3].map(&block)