Do not drop negation if resulting type isn't boolean

This commit is contained in:
Natalia Ukhorskaya
2015-12-17 11:01:03 +03:00
parent f84b3414c8
commit 43476bd773
3 changed files with 8 additions and 4 deletions
@@ -1,4 +1,3 @@
// SKIP_ERRORS_AFTER
operator fun String.not(): Boolean {
return length == 0
}
@@ -1,8 +1,7 @@
// SKIP_ERRORS_AFTER
operator fun String.not(): Boolean {
return length == 0
}
fun foo(a: Boolean, b: Boolean) : Boolean {
return "" && !b
return !!"" && !b
}