diff options
author | chriseth <chris@ethereum.org> | 2016-08-26 16:11:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-26 16:11:34 +0800 |
commit | d209e65b1d9ce3f49821970e96e027ba5243e386 (patch) | |
tree | b08cb8a4cb5fd592e67bd4a25de92980a63eec16 /libsolidity | |
parent | 3eeefb5c9e27c9401184cc28cf72bfd37ac35785 (diff) | |
parent | ce42114c4170406f1f7ce67d57429ff3e7b73079 (diff) | |
download | dexon-solidity-d209e65b1d9ce3f49821970e96e027ba5243e386.tar.gz dexon-solidity-d209e65b1d9ce3f49821970e96e027ba5243e386.tar.zst dexon-solidity-d209e65b1d9ce3f49821970e96e027ba5243e386.zip |
Merge pull request #949 from chriseth/fallbackReturn
Disallow fallback function to return values.
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/analysis/TypeChecker.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index 6b2c1cb8..235fcabd 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -94,6 +94,8 @@ bool TypeChecker::visit(ContractDefinition const& _contract) fallbackFunction = function; if (!fallbackFunction->parameters().empty()) typeError(fallbackFunction->parameterList().location(), "Fallback function cannot take parameters."); + if (!fallbackFunction->returnParameters().empty()) + typeError(fallbackFunction->returnParameterList()->location(), "Fallback function cannot return values."); } } if (!function->isImplemented()) |