mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
An extra assert for no operator for libraries in ASTJsonExporter::visit
This commit is contained in:
parent
c89eecf52b
commit
e3f5c4c1b5
@ -344,7 +344,12 @@ bool ASTJsonExporter::visit(UsingForDirective const& _node)
|
||||
attributes.emplace_back("functionList", std::move(functionList));
|
||||
}
|
||||
else
|
||||
attributes.emplace_back("libraryName", toJson(*_node.functionsOrLibrary().front()));
|
||||
{
|
||||
solAssert(_node.functionsAndOperators().size() == 1);
|
||||
auto const& functionAndOperator = _node.functionsAndOperators().front();
|
||||
solAssert(!functionAndOperator.second.has_value());
|
||||
attributes.emplace_back("libraryName", toJson(*(functionAndOperator.first)));
|
||||
}
|
||||
attributes.emplace_back("global", _node.global());
|
||||
|
||||
setJsonNode(_node, "UsingForDirective", std::move(attributes));
|
||||
|
Loading…
Reference in New Issue
Block a user