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

constructor public by default #4254

Closed
benjiqq opened this issue Jun 10, 2018 · 1 comment
Closed

constructor public by default #4254

benjiqq opened this issue Jun 10, 2018 · 1 comment

Comments

@benjiqq
Copy link

benjiqq commented Jun 10, 2018

constructor requires public keyword, but should be public by default I believe


contract Foo {
   constructor(){//..}
}

versus

contract Foo {
   constructor() public{//..}
}
@erak
Copy link
Collaborator

erak commented Jun 10, 2018

@benjyZ This behaviour is by design. The reasoning behind it is, that making something externally accessible should be a concious decision made by the programmer. Please see #2608 for further discussion on the default visibility of functions.

@erak erak closed this as completed Jun 10, 2018
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