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

Interfaces: require external visibility #3442

Closed
fulldecent opened this issue Jan 28, 2018 · 7 comments
Closed

Interfaces: require external visibility #3442

fulldecent opened this issue Jan 28, 2018 · 7 comments
Assignees

Comments

@fulldecent
Copy link
Contributor

fulldecent commented Jan 28, 2018

The Ethereum ABI specification does not make a distinction between external and public functions. Therefore the Interface keyword likewise should not so distinguish.

Currently private and internal are disallowed in interfacess.

For clarity, only external functions should be allowed in interfaces.

@chriseth
Copy link
Contributor

@axic why did we not disallow public in interfaces?

@axic
Copy link
Member

axic commented Jan 29, 2018

I thought it only supports external. I think it only should support external.

Removing the visibility specifier would be a bad idea because we require it everywhere else (starting 0.5.0) and that would create an exception, which could be confusing.

@fulldecent fulldecent changed the title Interface: disallow visibility specifier Interfaces: require external visibility Jan 29, 2018
@fulldecent
Copy link
Contributor Author

Understood, issue updated

@axic
Copy link
Member

axic commented Jan 29, 2018

Actually it seems this is a duplicate of #2330.

@fulldecent
Copy link
Contributor Author

This issue regards requiring external in Interface functions.

Issue #2330 regards subclassing ("implement"?, "overriding"?) interfaces with a public function.

@axic
Copy link
Member

axic commented Jan 30, 2018

Right, it seems to be a mix, though there's this also: #2330 (comment)

@axic
Copy link
Member

axic commented Jan 31, 2018

Actually #3038 has implemented this a while back for 0.5.0 mode.

We can however make public a warning now (that change allowed public in non-0.5.0 mode).

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

4 participants