aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/ReferencesResolver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/analysis/ReferencesResolver.cpp')
-rw-r--r--libsolidity/analysis/ReferencesResolver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libsolidity/analysis/ReferencesResolver.cpp b/libsolidity/analysis/ReferencesResolver.cpp
index 41cad922..c49af013 100644
--- a/libsolidity/analysis/ReferencesResolver.cpp
+++ b/libsolidity/analysis/ReferencesResolver.cpp
@@ -95,7 +95,8 @@ void ReferencesResolver::endVisit(FunctionTypeName const& _typeName)
typeError(_typeName.location(), "Invalid visibility, can only be \"external\" or \"internal\".");
}
- // Do we allow storage references for external functions?
+ if (_typeName.isPayable() && _typeName.visibility() != VariableDeclaration::Visibility::External)
+ fatalTypeError(_typeName.location(), "Only external function types can be payable.");
_typeName.annotation().type = make_shared<FunctionType>(_typeName);
}