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

Warn about functions named "constructor". #3923

Merged
merged 1 commit into from
Apr 18, 2018
Merged

Warn about functions named "constructor". #3923

merged 1 commit into from
Apr 18, 2018

Conversation

chriseth
Copy link
Contributor

Fixes #3915

}
if (_function.name() == "constructor")
m_errorReporter.warning(_function.location(), "This function is named \"constructor\" but is not the constructor of the contract.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we may want a better text here. Like the one we give when using the old-style constructor.

@chriseth
Copy link
Contributor Author

@axic updated

@chriseth
Copy link
Contributor Author

Fixed the test failure.

@axic axic merged commit 39b7b44 into develop Apr 18, 2018
@axic axic deleted the warnConstructor branch April 18, 2018 21:23
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

Successfully merging this pull request may close these issues.

2 participants