Disallow comparisons between some types.

This commit is contained in:
chriseth
2017-06-26 16:30:36 +02:00
parent d2445dfdce
commit f47e6e90fb
4 changed files with 16 additions and 5 deletions
@@ -1366,6 +1366,7 @@ void ExpressionCompiler::appendAndOrOperatorCode(BinaryOperation const& _binaryO
void ExpressionCompiler::appendCompareOperatorCode(Token::Value _operator, Type const& _type)
{
solAssert(_type.sizeOnStack() == 1, "Comparison of multi-slot types.");
if (_operator == Token::Equal || _operator == Token::NotEqual)
{
if (FunctionType const* funType = dynamic_cast<decltype(funType)>(&_type))