Skip to content

Commit b6f11b3

Browse files
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.
2 parents b2ac0da + a73bf91 commit b6f11b3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

liblangutil/SourceReferenceFormatter.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ void SourceReferenceFormatter::printSourceLocation(SourceReference const& _ref)
124124

125125
string_view text = _ref.text;
126126

127+
if (m_charStreamProvider.charStream(_ref.sourceName).isImportedFromAST())
128+
return;
129+
127130
if (!_ref.multiline)
128131
{
129132
size_t const locationLength = static_cast<size_t>(_ref.endColumn - _ref.startColumn);

0 commit comments

Comments
 (0)