arekolek
08/28/2019, 10:27 AMfun test(a: Pair<Int, String>, b: Pair<Int, String>): Boolean {
return a.first == b.first
&& a.second == b.second
}
and use extract variable refactoring to get:
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.Szymon Lipiński
08/28/2019, 1:28 PMarekolek
08/28/2019, 2:10 PM(a
+ b
+ c)
But I’m thinking it doesn’t matter in this case?