aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-01-07 01:55:31 +0800
committerChristian <c@ethdev.com>2015-01-09 22:09:10 +0800
commitdcda38cf3806c1d4205136c55d17f1e73eda48c1 (patch)
treea9332d91cbad1eff5e10ebbebf1ab6bee8ac999c /AST.cpp
parentffeb7daf11a3186d01d75b4bcdfbbbd106d07680 (diff)
downloaddexon-solidity-dcda38cf3806c1d4205136c55d17f1e73eda48c1.tar.gz
dexon-solidity-dcda38cf3806c1d4205136c55d17f1e73eda48c1.tar.zst
dexon-solidity-dcda38cf3806c1d4205136c55d17f1e73eda48c1.zip
Use shared_from_this instead of manually supplying a shared_ptr to this.
Diffstat (limited to 'AST.cpp')
-rw-r--r--AST.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/AST.cpp b/AST.cpp
index 1247f325..bcaae0e1 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -193,8 +193,8 @@ void Assignment::checkTypeRequirements()
{
// compound assignment
m_rightHandSide->checkTypeRequirements();
- TypePointer resultType = Type::binaryOperatorResult(Token::AssignmentToBinaryOp(m_assigmentOperator),
- m_type, m_rightHandSide->getType());
+ TypePointer resultType = m_type->binaryOperatorResult(Token::AssignmentToBinaryOp(m_assigmentOperator),
+ m_rightHandSide->getType());
if (!resultType || *resultType != *m_type)
BOOST_THROW_EXCEPTION(createTypeError("Operator not compatible with type."));
}
@@ -237,7 +237,7 @@ void BinaryOperation::checkTypeRequirements()
{
m_left->checkTypeRequirements();
m_right->checkTypeRequirements();
- m_commonType = Type::binaryOperatorResult(m_operator, m_left->getType(), m_right->getType());
+ m_commonType = m_left->getType()->binaryOperatorResult(m_operator, m_right->getType());
if (!m_commonType)
BOOST_THROW_EXCEPTION(createTypeError("Operator " + string(Token::toString(m_operator)) +
" not compatible with types " +