diff options
author | Christian <c@ethdev.com> | 2015-01-07 02:08:24 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-01-09 22:09:10 +0800 |
commit | be1e89da42e0ed9828dd2fb5939fd7bd48140be7 (patch) | |
tree | 977979fe84ea56786984dafe99be7952eb111c2a /AST.cpp | |
parent | dcda38cf3806c1d4205136c55d17f1e73eda48c1 (diff) | |
download | dexon-solidity-be1e89da42e0ed9828dd2fb5939fd7bd48140be7.tar.gz dexon-solidity-be1e89da42e0ed9828dd2fb5939fd7bd48140be7.tar.zst dexon-solidity-be1e89da42e0ed9828dd2fb5939fd7bd48140be7.zip |
Possibility for unary operators to change type.
Diffstat (limited to 'AST.cpp')
-rw-r--r-- | AST.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -228,8 +228,8 @@ void UnaryOperation::checkTypeRequirements() m_subExpression->checkTypeRequirements(); if (m_operator == Token::Value::INC || m_operator == Token::Value::DEC || m_operator == Token::Value::DELETE) m_subExpression->requireLValue(); - m_type = m_subExpression->getType(); - if (!m_type->acceptsUnaryOperator(m_operator)) + m_type = m_subExpression->getType()->unaryOperatorResult(m_operator); + if (!m_type) BOOST_THROW_EXCEPTION(createTypeError("Unary operator not compatible with type.")); } |