fix: function field notation errors when head is an fvar (#9595)

This PR improves the error message displayed when writing an invalid
projection on a free variable of function type.
3 files changed