mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Modified SourceLocation::hasText() to allow empty source.
This commit is contained in:
@@ -76,7 +76,8 @@ struct SourceLocation
|
||||
source &&
|
||||
0 <= start &&
|
||||
start <= end &&
|
||||
end <= int(source->source().length());
|
||||
// in some cases (json import) source->source() can be empty
|
||||
(source->source().empty() || end <= int(source->source().length()));
|
||||
}
|
||||
|
||||
std::string text() const
|
||||
@@ -124,7 +125,7 @@ inline std::ostream& operator<<(std::ostream& _out, SourceLocation const& _locat
|
||||
if (_location.source)
|
||||
_out << _location.source->name();
|
||||
|
||||
_out << "[" << _location.start << "," << _location.end << "]";
|
||||
_out << "[" << _location.start << "," << _location.end << ")";
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user