Pattern: Unused unary operator
Issue: -
Detects unused unary operators.
Example of incorrect code:
val x = 1 + 2
+ 3 + 4
println(x) // 3
Example of correct code:
val x = 1 + 2 + 3 + 4
println(x) // 10
Pattern: Unused unary operator
Issue: -
Detects unused unary operators.
Example of incorrect code:
val x = 1 + 2
+ 3 + 4
println(x) // 3
Example of correct code:
val x = 1 + 2 + 3 + 4
println(x) // 10