Changing the error reporting approach while type checking