aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-06-29 00:09:16 +0800
committerchriseth <chris@ethereum.org>2018-07-04 04:51:36 +0800
commit87241fd58c7ddf45224f308f5fa10d88030bdb25 (patch)
tree8585cbe31a8777fbf8dca37550264fac566931be /libsolidity/analysis
parent533d5d4b1cc4374decc704de8c86ad4cef6214fc (diff)
downloaddexon-solidity-87241fd58c7ddf45224f308f5fa10d88030bdb25.tar.gz
dexon-solidity-87241fd58c7ddf45224f308f5fa10d88030bdb25.tar.zst
dexon-solidity-87241fd58c7ddf45224f308f5fa10d88030bdb25.zip
Fallback function has 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 3bd0b4c1..ebf523ea 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\".");
}