diff options
author | chriseth <chris@ethereum.org> | 2018-04-20 01:24:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-20 01:24:01 +0800 |
commit | 124ca40dc525a987a88176c6e5170978e82fa290 (patch) | |
tree | b1c1da8a9a6ba886bb43f115328a18222f59553d /libsolidity/analysis/SyntaxChecker.cpp | |
parent | 4cb486ee993cadde5564fb6c611d2bcf4fc44414 (diff) | |
parent | 7fb431ad7d0f7667c83d3f9b2350c3a1cef73b9e (diff) | |
download | dexon-solidity-124ca40dc525a987a88176c6e5170978e82fa290.tar dexon-solidity-124ca40dc525a987a88176c6e5170978e82fa290.tar.gz dexon-solidity-124ca40dc525a987a88176c6e5170978e82fa290.tar.bz2 dexon-solidity-124ca40dc525a987a88176c6e5170978e82fa290.tar.lz dexon-solidity-124ca40dc525a987a88176c6e5170978e82fa290.tar.xz dexon-solidity-124ca40dc525a987a88176c6e5170978e82fa290.tar.zst dexon-solidity-124ca40dc525a987a88176c6e5170978e82fa290.zip |
Merge pull request #3950 from ethereum/develop
Merge develop into release for 0.4.23
Diffstat (limited to 'libsolidity/analysis/SyntaxChecker.cpp')
-rw-r--r-- | libsolidity/analysis/SyntaxChecker.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp index f648e5b4..396058f4 100644 --- a/libsolidity/analysis/SyntaxChecker.cpp +++ b/libsolidity/analysis/SyntaxChecker.cpp @@ -237,8 +237,13 @@ bool SyntaxChecker::visit(FunctionDefinition const& _function) if (v050) m_errorReporter.syntaxError(_function.location(), "Functions without implementation cannot have modifiers."); else - m_errorReporter.warning( _function.location(), "Modifiers of functions without implementation are ignored." ); + m_errorReporter.warning(_function.location(), "Modifiers of functions without implementation are ignored." ); } + if (_function.name() == "constructor") + m_errorReporter.warning(_function.location(), + "This function is named \"constructor\" but is not the constructor of the contract. " + "If you intend this to be a constructor, use \"constructor(...) { ... }\" without the \"function\" keyword to define it." + ); return true; } |