Detect a type error when two sub-expressions don't match in type when they need to.