-
Notifications
You must be signed in to change notification settings - Fork 656
Conversation
Found there has some differ from our test case, here is I // valid
if (!true) {consequent;};
true ? consequent : alternate;
// invalid
if (true) {alternate} else {consequent}
!condition ? consequent : alternate;
-----------------------
// valid
if (!true) {consequent;};
true ? consequent : alternate;
// invalid
if (!true) {consequent} else {alternate}
condition ? alternate : consequent; here is the snapshot result: Input// valid
if (!true) {consequent;};
true ? consequent : alternate;
// invalid
if (!true) {consequent} else {alternate}
!condition ? consequent : alternate; Diagnostics
You could see here, the replacement of
error[noNegationElse]: Invert blocks when performing a negation test. Replace with strict equality
|
@ematipico , @leops this pull request is ready for reviewing |
…ls into feat/no-negation-else
conditionExpression not directly under StatementExpression
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the formatting issues are fixed (just running cargo fmt
should take care of it) it should be good to merge
@leops , format done. |
Summary
Test Plan