From 87241fd58c7ddf45224f308f5fa10d88030bdb25 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 28 Jun 2018 18:09:16 +0200 Subject: Fallback function has to be external. --- libsolidity/analysis/TypeChecker.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'libsolidity') 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\"."); } -- cgit