diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-03-02 01:39:01 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-04-04 00:21:55 +0800 |
commit | d664a599e68291166c47fcece464cb8d0af31df8 (patch) | |
tree | 26668133eed7076b9d5a94d2a1f6ba982f79250e /libsolidity/ast/AST.h | |
parent | 0edce4b570c157927933697b30f0f94cbdf173b2 (diff) | |
download | dexon-solidity-d664a599e68291166c47fcece464cb8d0af31df8.tar.gz dexon-solidity-d664a599e68291166c47fcece464cb8d0af31df8.tar.zst dexon-solidity-d664a599e68291166c47fcece464cb8d0af31df8.zip |
Constructors are defined using the ``constructor`` keyword.
Diffstat (limited to 'libsolidity/ast/AST.h')
-rw-r--r-- | libsolidity/ast/AST.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h index 9c67d354..56bb412c 100644 --- a/libsolidity/ast/AST.h +++ b/libsolidity/ast/AST.h @@ -607,7 +607,8 @@ public: StateMutability stateMutability() const { return m_stateMutability; } bool isConstructor() const { return m_isConstructor; } - bool isFallback() const { return name().empty(); } + bool isOldStyleConstructor() const { return m_isConstructor && !name().empty(); } + bool isFallback() const { return !m_isConstructor && name().empty(); } bool isPayable() const { return m_stateMutability == StateMutability::Payable; } std::vector<ASTPointer<ModifierInvocation>> const& modifiers() const { return m_functionModifiers; } std::vector<ASTPointer<VariableDeclaration>> const& returnParameters() const { return m_returnParameters->parameters(); } |