KT-4568: Created the ConvertNegatedBooleanSequence intention. This intention takes an expression of the form !a &&,|| !b &&,|| ... and converts it to the DeMorgan equivalent !(a &&,|| b ...).
This commit is contained in:
committed by
Mikhael Bogdanov
parent
4088f4a00e
commit
2147a88ed8
+3
@@ -0,0 +1,3 @@
|
||||
fun foo(a: Boolean, b: Boolean) {
|
||||
return <spot> !(a || b) </spot>
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun foo(a: Boolean, b: Boolean) {
|
||||
return <spot> !a && !b</spot>
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention converts a sequence of negated boolean expressions with the DeMorgan equivalent.
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user