diff options
author | chriseth <c@ethdev.com> | 2014-11-04 01:39:16 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-11-04 18:56:19 +0800 |
commit | ef546e789a31a8ef5728625db38a673c1d9faed4 (patch) | |
tree | f2224a876a8bf405f5e18689e801a7f7381de837 /AST.cpp | |
parent | 4dfd6dfa13929f31dcea889d17a6fc77137f9c67 (diff) | |
download | dexon-solidity-ef546e789a31a8ef5728625db38a673c1d9faed4.tar dexon-solidity-ef546e789a31a8ef5728625db38a673c1d9faed4.tar.gz dexon-solidity-ef546e789a31a8ef5728625db38a673c1d9faed4.tar.bz2 dexon-solidity-ef546e789a31a8ef5728625db38a673c1d9faed4.tar.lz dexon-solidity-ef546e789a31a8ef5728625db38a673c1d9faed4.tar.xz dexon-solidity-ef546e789a31a8ef5728625db38a673c1d9faed4.tar.zst dexon-solidity-ef546e789a31a8ef5728625db38a673c1d9faed4.zip |
Stylistic changes.
Diffstat (limited to 'AST.cpp')
-rw-r--r-- | AST.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -333,11 +333,9 @@ void Assignment::checkTypeRequirements() m_rightHandSide->expectType(*m_leftHandSide->getType()); m_type = m_leftHandSide->getType(); if (m_assigmentOperator != Token::ASSIGN) - { // compound assignment if (!m_type->acceptsBinaryOperator(Token::AssignmentToBinaryOp(m_assigmentOperator))) BOOST_THROW_EXCEPTION(createTypeError("Operator not compatible with type.")); - } } void ExpressionStatement::checkTypeRequirements() @@ -358,10 +356,8 @@ void UnaryOperation::checkTypeRequirements() // INC, DEC, ADD, SUB, NOT, BIT_NOT, DELETE m_subExpression->checkTypeRequirements(); if (m_operator == Token::Value::INC || m_operator == Token::Value::DEC || m_operator == Token::Value::DELETE) - { if (!m_subExpression->isLvalue()) BOOST_THROW_EXCEPTION(createTypeError("Expression has to be an lvalue.")); - } m_type = m_subExpression->getType(); if (!m_type->acceptsUnaryOperator(m_operator)) BOOST_THROW_EXCEPTION(createTypeError("Unary operator not compatible with type.")); |