David Glasser
06/08/2020, 5:03 PMExpression<Boolean>.and
and friends) w.r.t. operator precedence. Do I just need to always parenthesize every sub-expression? I guess Kotlin doesn’t really do precedence levels of custom infix operators?Joel
06/08/2020, 5:26 PMcolumnA eq true and columnB eq false
I believe that and
and eq
have the same precedence because they are both method calls, so the compilter thinks you are trying to execute (columnA eq true and columnB) eq false
which is obviously not correct.Joel
06/08/2020, 5:28 PMcolumnA eq true and (columnB eq false)
meaning you should parenthesize everything but the first statement, but it can't hurt to also parenthesize the first statement if that looks good to you.David Glasser
06/08/2020, 5:29 PMJoel
06/08/2020, 5:31 PM