Albert Fernández Marsal created GROOVY-8929:
-----------------------------------------------

             Summary: Inconsistent equals and hashCode for int[]
                 Key: GROOVY-8929
                 URL: https://issues.apache.org/jira/browse/GROOVY-8929
             Project: Groovy
          Issue Type: Bug
    Affects Versions: 2.5.4
            Reporter: Albert Fernández Marsal


{code}
09:29:~$ groovysh
Groovy Shell (2.4.14, JVM: 1.8.0_171)
Type ':help' or ':h' for help.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
groovy:000> a = [1,2,3] as int[]
===> [1, 2, 3]
groovy:000> a.class
===> class [I
groovy:000> b = [1,2,3] as int[]
===> [1, 2, 3]
groovy:000> b.class
===> class [I
groovy:000> a == b
===> true
groovy:000> a.hashCode()
===> 1329315688
groovy:000> b.hashCode()
===> 1489933928
groovy:000>
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to