mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fallback function has to be external.
This commit is contained in:
parent
533d5d4b1c
commit
87241fd58c
@ -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\".");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user