diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-01-30 01:44:14 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-01-30 02:18:50 +0800 |
commit | 3701543ae8dd8ffbfd58e5648d45699468f10a55 (patch) | |
tree | 7b10e0bbbac6139c6cee92b9ebd040444507a311 /Types.h | |
parent | 04190798eba7a2996b28aee6d74b1c636f575a02 (diff) | |
download | dexon-solidity-3701543ae8dd8ffbfd58e5648d45699468f10a55.tar.gz dexon-solidity-3701543ae8dd8ffbfd58e5648d45699468f10a55.tar.zst dexon-solidity-3701543ae8dd8ffbfd58e5648d45699468f10a55.zip |
FunctionType now returns const ref for Declaration
Diffstat (limited to 'Types.h')
-rw-r--r-- | Types.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -390,7 +390,12 @@ public: /// If @a _name is not provided (empty string) then the @c m_declaration member of the /// function type is used std::string getCanonicalSignature(std::string const& _name = "") const; - Declaration const* getDeclaration() const { return m_declaration; } + Declaration const& getDeclaration() const + { + solAssert(m_declaration, "Requested declaration from a FunctionType that has none"); + return *m_declaration; + } + bool hasDeclaration() const { return !!m_declaration; } bool isConstant() const { return m_isConstant; } /// @return A shared pointer of an ASTString. /// Can contain a nullptr in which case indicates absence of documentation |