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

Small issue on boolean expressions simplification rule (De Morgan's law) #1521

Closed
orchestr7 opened this issue Sep 13, 2022 · 0 comments · Fixed by #1523
Closed

Small issue on boolean expressions simplification rule (De Morgan's law) #1521

orchestr7 opened this issue Sep 13, 2022 · 0 comments · Fixed by #1523
Assignees
Labels
bug Something isn't working
Milestone

Comments

@orchestr7
Copy link
Member

orchestr7 commented Sep 13, 2022

if (!(this.valueParameters[i].getFunctionName() == other.valueParameters[i].getFunctionName() &&
                    this.valueParameters[i].getFunctionType() == other.valueParameters[i].getFunctionType())
) {

is fixed to

 fun foo() {
    if (!this.valueParameters[i].getFunctionName() == other.valueParameters[i].getFunctionName() || !this.valueParameters[i].getFunctionType() == other.valueParameters[i].getFunctionType()
    ) {
        return false
    }
}

And diktat forgets to add braces.

@orchestr7 orchestr7 added the bug Something isn't working label Sep 13, 2022
nulls added a commit that referenced this issue Sep 14, 2022
### What's done:
* added test

It closes #1521
nulls added a commit that referenced this issue Sep 14, 2022
### What's done:
* added test

It closes #1521
@0x6675636b796f75676974687562 0x6675636b796f75676974687562 added this to the 1.2.4 milestone Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants