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