mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add control flow tests for "and" and "or" operators
This commit is contained in:
@@ -57,6 +57,7 @@ unique_ptr<FunctionFlow> ControlFlowBuilder::createFunctionFlow(
|
||||
bool ControlFlowBuilder::visit(BinaryOperation const& _operation)
|
||||
{
|
||||
solAssert(!!m_currentNode, "");
|
||||
visitNode(_operation);
|
||||
|
||||
switch (_operation.getOperator())
|
||||
{
|
||||
@@ -65,7 +66,6 @@ bool ControlFlowBuilder::visit(BinaryOperation const& _operation)
|
||||
{
|
||||
visitNode(_operation);
|
||||
solAssert(!_operation.annotation().userDefinedFunction);
|
||||
visitNode(_operation);
|
||||
appendControlFlow(_operation.leftExpression());
|
||||
|
||||
auto nodes = splitFlow<2>();
|
||||
@@ -76,7 +76,6 @@ bool ControlFlowBuilder::visit(BinaryOperation const& _operation)
|
||||
}
|
||||
default:
|
||||
{
|
||||
visitNode(_operation);
|
||||
if (_operation.annotation().userDefinedFunction)
|
||||
{
|
||||
visitNode(_operation);
|
||||
|
||||
Reference in New Issue
Block a user