diff options
author | chriseth <c@ethdev.com> | 2016-08-25 19:25:30 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-08-26 06:07:50 +0800 |
commit | 21b6aa92ffe6f5662a234e6e290e842e963917d1 (patch) | |
tree | 688721282aa421c1d9f6fdb92da100dbf020fbad /libsolidity/analysis | |
parent | f329d5e772ed4314897c46b67b1459f39838a2cc (diff) | |
download | dexon-solidity-21b6aa92ffe6f5662a234e6e290e842e963917d1.tar dexon-solidity-21b6aa92ffe6f5662a234e6e290e842e963917d1.tar.gz dexon-solidity-21b6aa92ffe6f5662a234e6e290e842e963917d1.tar.bz2 dexon-solidity-21b6aa92ffe6f5662a234e6e290e842e963917d1.tar.lz dexon-solidity-21b6aa92ffe6f5662a234e6e290e842e963917d1.tar.xz dexon-solidity-21b6aa92ffe6f5662a234e6e290e842e963917d1.tar.zst dexon-solidity-21b6aa92ffe6f5662a234e6e290e842e963917d1.zip |
Disallow fallback function to return values.
Diffstat (limited to 'libsolidity/analysis')
-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()) |