Disallow visibility for constructors.

This commit is contained in:
chriseth
2020-07-07 11:49:44 +02:00
parent 312403f7fb
commit da36400576
7 changed files with 26 additions and 26 deletions
+1 -3
View File
@@ -505,8 +505,6 @@ public:
/// Returns the constructor or nullptr if no constructor was specified.
FunctionDefinition const* constructor() const;
/// @returns true iff the constructor of this contract is public (or non-existing).
bool constructorIsPublic() const;
/// @returns true iff the contract can be deployed, i.e. is not abstract and has a
/// public constructor.
/// Should only be called after the type checker has run.
@@ -814,7 +812,7 @@ public:
}
bool isVisibleViaContractTypeAccess() const override
{
return visibility() >= Visibility::Public;
return isOrdinary() && visibility() >= Visibility::Public;
}
bool isPartOfExternalInterface() const override { return isPublic() && isOrdinary(); }