Add an intention to simplify negated binary expressions

Given an expression of the form `!(a op b)`, replace it with `a !op b`.

For example:

    !(a < b)    -> a >= b
    !(a is Int) -> a !is int
This commit is contained in:
Steven Allen
2014-03-19 12:10:28 -04:00
parent 626ec6519c
commit d198465522
31 changed files with 283 additions and 1 deletions
@@ -0,0 +1,5 @@
// INTENTION_TEXT: Simplify negated '!in' expression to 'in'
fun test(n: Int) {
val arr = ArrayList<Int>(1)
0 in arr
}