mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[cond-expr] support conditional expression as lvalue
This commit is contained in:
parent
4471a2ce3b
commit
9cd96222da
@ -769,6 +769,14 @@ void TypeChecker::endVisit(Conditional const& _conditional)
|
||||
"."
|
||||
);
|
||||
_conditional.annotation().type = commonType;
|
||||
|
||||
if (_conditional.annotation().lValueRequested)
|
||||
{
|
||||
requireLValue(_conditional.trueExpression());
|
||||
requireLValue(_conditional.falseExpression());
|
||||
|
||||
_conditional.annotation().isLValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool TypeChecker::visit(Assignment const& _assignment)
|
||||
|
Loading…
Reference in New Issue
Block a user