-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constructor ignores visibility modifier #979
Comments
Fixing this will also "fix" #422. |
A non-public constructor is useful for base classes. We should enforce visibility and make contracts with non-public constructors abstract. |
An external constructor does not make much sense. The Therefore, I would say we should only allow |
DSTest is now abstract. for more on `internal` constructors see ethereum/solidity#979
For any of the visibilities (internal, external, private, public):
the following ABI is generated:
[{"inputs":[],"type":"constructor"}]
, and contract deployment works without hiccups.I think it would make sense rejecting any visibility modifier on the constructor. Are there any cases currently where a non-public constructor is useful? We do not have static methods, so I don't see a way a non-public constructor could be executed.
The text was updated successfully, but these errors were encountered: