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));
|
attributes.emplace_back("functionList", std::move(functionList));
|
||||||
}
|
}
|
||||||
else
|
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());
|
attributes.emplace_back("global", _node.global());
|
||||||
|
|
||||||
setJsonNode(_node, "UsingForDirective", std::move(attributes));
|
setJsonNode(_node, "UsingForDirective", std::move(attributes));
|
||||||
|
@ -2,7 +2,7 @@ using {add as +} for S;
|
|||||||
|
|
||||||
struct S {
|
struct S {
|
||||||
uint x;
|
uint x;
|
||||||
}
|
}
|
||||||
|
|
||||||
function add(S calldata, S calldata) pure returns (S calldata r) {
|
function add(S calldata, S calldata) pure returns (S calldata r) {
|
||||||
assembly {
|
assembly {
|
||||||
|
Loading…
Reference in New Issue
Block a user