Skip to content
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

Should the compiler raise visibility warnings for constructor functions? #3052

Closed
JohnAllen opened this issue Oct 8, 2017 · 2 comments
Closed

Comments

@JohnAllen
Copy link
Contributor

JohnAllen commented Oct 8, 2017

I assume the visibility warnings are there to get developers thinking more about function visibilities to prevent future multi-sig-like hacks, etc.

Should there be one for constructor functions though? I'm getting No visibility specified warnings in remix using v0.4.17+commit.bdeb9e52.js for all of my constructor functions. I assume they can't be run more than once -- at deploy time and just searched the docs in case they can be, but didn't find anything.

@JohnAllen
Copy link
Contributor Author

Just found out the hard way that various deployment options will throw unrelated errors if constructor functions are marked internal. So perhaps the warning should say that? Will look in the source to see if this is a simple string change.

@axic
Copy link
Member

axic commented Oct 30, 2017

The reason is explained in #2638 (also see #3132).

various deployment options will throw unrelated errors if constructor functions are marked internal

Do you have examples for any of these?

I'm closing this as a duplicate now, but if you do find examples where unrelated errors surface, please do reopen or create new issues for those.

@axic axic closed this as completed Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants