aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-07-11 03:39:25 +0800
committerGitHub <noreply@github.com>2018-07-11 03:39:25 +0800
commitd84976dc871a1fdfab233650b989af69e325bf2b (patch)
tree146c0efc9c43d26617993cf5e8fc1e5cc592def6 /libsolidity/analysis
parent49cc1b855464d428f022267b5997dfc093ea1b44 (diff)
parentbc6b42a9f6056f9e6e3bf9467562fd61c044e95b (diff)
downloaddexon-solidity-d84976dc871a1fdfab233650b989af69e325bf2b.tar.gz
dexon-solidity-d84976dc871a1fdfab233650b989af69e325bf2b.tar.zst
dexon-solidity-d84976dc871a1fdfab233650b989af69e325bf2b.zip
Merge pull request #4376 from ethereum/fallbackExternal
Fallback functions have to be external
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/TypeChecker.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index b631bd1e..78536664 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -123,10 +123,7 @@ bool TypeChecker::visit(ContractDefinition const& _contract)
m_errorReporter.typeError(function->parameterList().location(), "Fallback function cannot take parameters.");
if (!function->returnParameters().empty())
m_errorReporter.typeError(function->returnParameterList()->location(), "Fallback function cannot return values.");
- if (
- _contract.sourceUnit().annotation().experimentalFeatures.count(ExperimentalFeature::V050) &&
- function->visibility() != FunctionDefinition::Visibility::External
- )
+ if (function->visibility() != FunctionDefinition::Visibility::External)
m_errorReporter.typeError(function->location(), "Fallback function must be defined as \"external\".");
}