.deep
to compare Array
s is deprecated SC-W1051Comparing two Array
s using .deep
is deprecated and is not supported beyond Scala version 2.12. To avoid compilation errors when moving to version 2.13 and above, consider switching to a more well supported alternative.
val a = Array(1, 2, 3)
val b = Array(1, 2)
val arraysEqual = a.deep == b.deep
val a = Array(1, 2, 3)
val b = Array(1, 2)
a.sameElements(b) // The native Scala approach
java.util.Arrays.equals(a, b) // The usual Java way