mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Function types.
This commit is contained in:
1 parent
c811691861
commit
cc8583ec7d
17 files changed
+381
-61
No files matched your search
@@ -83,6 +83,23 @@ void ReferencesResolver::endVisit(UserDefinedTypeName const& _typeName)
|
||||
fatalTypeError(_typeName.location(), "Name has to refer to a struct, enum or contract.");
|
||||
}
|
||||
|
||||
void ReferencesResolver::endVisit(FunctionTypeName const& _typeName)
|
||||
{
|
||||
switch (_typeName.visibility())
|
||||
{
|
||||
case VariableDeclaration::Visibility::Default:
|
||||
case VariableDeclaration::Visibility::Internal:
|
||||
case VariableDeclaration::Visibility::External:
|
||||
break;
|
||||
default:
|
||||
typeError(_typeName.location(), "Invalid visibility, can only be \"external\" or \"internal\".");
|
||||
}
|
||||
|
||||
// Do we allow storage references for external functions?
|
||||
|
||||
_typeName.annotation().type = make_shared<FunctionType>(_typeName);
|
||||
}
|
||||
|
||||
void ReferencesResolver::endVisit(Mapping const& _typeName)
|
||||
{
|
||||
TypePointer keyType = _typeName.keyType().annotation().type;
|
||||
|
||||
Reference in new issue
Block a user