typing: on type error, also indicate the resolved type