Merge pull request #13244 from ethereum/remove-code-snippets-from-error-import-ast-mode

Removed wrong code snippets from error messages when in import-ast mode.
This commit is contained in:
matheusaaguiar 2022-07-06 16:25:43 -03:00 committed by GitHub
commit b6f11b3392
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,6 +124,9 @@ void SourceReferenceFormatter::printSourceLocation(SourceReference const& _ref)
string_view text = _ref.text;
if (m_charStreamProvider.charStream(_ref.sourceName).isImportedFromAST())
return;
if (!_ref.multiline)
{
size_t const locationLength = static_cast<size_t>(_ref.endColumn - _ref.startColumn);