resolveName adds a completion point for it using the given
expected type. Thus, we propagate the expected type if
stx is an identifier.
It doesn't "hurt" if the identifier can be resolved because the expected type is not used in this case.
Recall that if the name resolution fails a synthetic sorry is returned.