Skip to content

TupleXXL should use BoxesRunTime instead of java.util.Arrays.{deepEquals, deepHashCode} #8314

@xuwei-k

Description

@xuwei-k

minimized code

dotty version: 0.22.0-RC1

scala> val t22_1 = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
val t22_1: (Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int
  , 
Int, Int, Int, Int, Int, Int, Int, Int) = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22)

scala> val t22_2 = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22.0)                                                                                                                                                                                        
val t22_2: (Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int
  , 
Int, Int, Int, Int, Int, Int, Int, Double) = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22.0)

scala> t22_1 == t22_2
val res0: Boolean = true

scala> val t23_1 = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23)
val t23_1: (Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int
  , 
Int, Int, Int, Int, Int, Int, Int, Int, Int) = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23)

scala> val t23_2 = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23.0)
val t23_2: (Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int
  , 
Int, Int, Int, Int, Int, Int, Int, Int, Double) = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23.0)

scala> t23_1 == t23_2
val res1: Boolean = false

expectation

I think t23_1 == t23_2 should return true.
also should not use java.util.Arrays.deepHashCode

references

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions