fun test(a: Pair<Int, String>, b: Pair<Int, String>): Boolean {
val result = (a.first == b.first
&& a.second == b.second)
return result
}
you can see IDE added parentheses there. Aren’t those unnecessary? IDE doesn’t offer an intention to get rid of them. But if I do, it compiles and runs the same.
s
Szymon Lipiński
08/28/2019, 1:28 PM
I have this intention if the whole expression is in one line
a
arekolek
08/28/2019, 2:10 PM
Maybe it’s because sometimes the parens are need for multiple lines, like with