[cond-expr] add a test for different types

This commit is contained in:
Lu Guanqun
2016-01-22 17:14:01 +00:00
parent 1cd3288311
commit ac3019298a
2 changed files with 16 additions and 1 deletions
+1 -1
View File
@@ -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(