Deprecate use of unary '+'#2199
Merged
chriseth merged 2 commits intoargotorg:developfrom May 2, 2017
roadriverrail:no_unary_plus
Merged
Deprecate use of unary '+'#2199chriseth merged 2 commits intoargotorg:developfrom roadriverrail:no_unary_plus
chriseth merged 2 commits intoargotorg:developfrom
roadriverrail:no_unary_plus
Conversation
The unary '+' serves no meaningful purpose in Solidity and it makes it possible to produce typos with dagerous implications (e.g. 'a =+5 '), so we are deprecating it. The SyntaxChecker currently issues warnings on the unary '+' but will still compile it for now.
axic
reviewed
May 1, 2017
| return Error::containsOnlyWarnings(m_errors); | ||
| } | ||
|
|
||
| void SyntaxChecker::warning(SourceLocation const& _location, string const& _description) |
Contributor
There was a problem hiding this comment.
We should figure out a way to have a helper for this. I think we have this duplicated in every single file almost by now.
Contributor
Author
There was a problem hiding this comment.
Agreed. I'm a fan of keeping refactoring commits separate from feature commits, so if it's okay, I'll work on a helper class in a separate pull request.
axic
approved these changes
May 2, 2017
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The unary '+' serves no meaningful purpose in Solidity and it makes it
possible to produce typos with dagerous implications (e.g. 'a =+5 '),
so we are deprecating it. The SyntaxChecker currently issues warnings
on the unary '+' but will still compile it for now.
This PR resolves issue #1760