aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2016-08-26 16:11:34 +0800
committerGitHub <noreply@github.com>2016-08-26 16:11:34 +0800
commitd209e65b1d9ce3f49821970e96e027ba5243e386 (patch)
treeb08cb8a4cb5fd592e67bd4a25de92980a63eec16 /libsolidity
parent3eeefb5c9e27c9401184cc28cf72bfd37ac35785 (diff)
parentce42114c4170406f1f7ce67d57429ff3e7b73079 (diff)
downloaddexon-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.cpp2
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())