diff options
author | chriseth <chris@ethereum.org> | 2018-04-12 04:25:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-12 04:25:36 +0800 |
commit | ee5d0ef79bee71a47249ed36081738dd34707900 (patch) | |
tree | fcc1d4e910eef36fef15fca3e036f3039146450c /libsolidity/analysis/SyntaxChecker.cpp | |
parent | 7626c8ab7276266c3721310d41455c393d1ee888 (diff) | |
parent | b5a696ad48780bf0614eef2a737a2e89963d4640 (diff) | |
download | dexon-solidity-ee5d0ef79bee71a47249ed36081738dd34707900.tar dexon-solidity-ee5d0ef79bee71a47249ed36081738dd34707900.tar.gz dexon-solidity-ee5d0ef79bee71a47249ed36081738dd34707900.tar.bz2 dexon-solidity-ee5d0ef79bee71a47249ed36081738dd34707900.tar.lz dexon-solidity-ee5d0ef79bee71a47249ed36081738dd34707900.tar.xz dexon-solidity-ee5d0ef79bee71a47249ed36081738dd34707900.tar.zst dexon-solidity-ee5d0ef79bee71a47249ed36081738dd34707900.zip |
Merge pull request #3752 from ethereum/fixStateVariableParsing
Fix state variable parsing
Diffstat (limited to 'libsolidity/analysis/SyntaxChecker.cpp')
-rw-r--r-- | libsolidity/analysis/SyntaxChecker.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp index 343b4ba8..f648e5b4 100644 --- a/libsolidity/analysis/SyntaxChecker.cpp +++ b/libsolidity/analysis/SyntaxChecker.cpp @@ -232,6 +232,13 @@ bool SyntaxChecker::visit(FunctionDefinition const& _function) "Use \"constructor(...) { ... }\" instead." ); } + if (!_function.isImplemented() && !_function.modifiers().empty()) + { + 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." ); + } return true; } |