Skip to content

Deprecate use of unary '+'#2199

Merged
chriseth merged 2 commits intoargotorg:developfrom
roadriverrail:no_unary_plus
May 2, 2017
Merged

Deprecate use of unary '+'#2199
chriseth merged 2 commits intoargotorg:developfrom
roadriverrail:no_unary_plus

Conversation

@roadriverrail
Copy link
Contributor

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

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.
return Error::containsOnlyWarnings(m_errors);
}

void SyntaxChecker::warning(SourceLocation const& _location, string const& _description)
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

@chriseth chriseth merged commit acab525 into argotorg:develop May 2, 2017
@chriseth chriseth mentioned this pull request May 3, 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

Successfully merging this pull request may close these issues.

4 participants