mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[cond-expr] change the end to end test
This commit is contained in:
@@ -758,8 +758,12 @@ bool TypeChecker::visit(Conditional const& _conditional)
|
||||
if (*trueType == *falseType)
|
||||
commonType = trueType;
|
||||
else
|
||||
// we fake it as an equal operator, but any other comparison operator can work.
|
||||
commonType = trueType->binaryOperatorResult(Token::Equal, falseType);
|
||||
{
|
||||
commonType = Type::commonType(trueType, falseType);
|
||||
if (!commonType)
|
||||
// we fake it as an equal operator, but any other comparison operator can work.
|
||||
commonType = trueType->binaryOperatorResult(Token::Equal, falseType);
|
||||
}
|
||||
if (!commonType)
|
||||
{
|
||||
typeError(
|
||||
|
||||
Reference in New Issue
Block a user