diff options
author | Christian <c@ethdev.com> | 2014-11-04 22:01:07 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-11-06 09:22:24 +0800 |
commit | 29c9a7aed90e415bcf5eebb16228336576643a3f (patch) | |
tree | 5679973a3098dafbd4aa97e2a26bbb8b05932178 /AST.h | |
parent | de493c673f2e850505d79185d104012825a7eabc (diff) | |
download | dexon-solidity-29c9a7aed90e415bcf5eebb16228336576643a3f.tar.gz dexon-solidity-29c9a7aed90e415bcf5eebb16228336576643a3f.tar.zst dexon-solidity-29c9a7aed90e415bcf5eebb16228336576643a3f.zip |
Allow implicit type conversions for comparisons.
Diffstat (limited to 'AST.h')
-rw-r--r-- | AST.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -565,12 +565,15 @@ public: Expression& getLeftExpression() const { return *m_left; } Expression& getRightExpression() const { return *m_right; } Token::Value getOperator() const { return m_operator; } + Type const& getCommonType() const { return *m_commonType; } private: ASTPointer<Expression> m_left; Token::Value m_operator; ASTPointer<Expression> m_right; + /// The common type that is used for the operation, not necessarily the result type (e.g. for + /// comparisons, this is always bool). std::shared_ptr<Type const> m_commonType; }; |