I'm afraid it's not a bug. Actually, `def a=new int[2][]` means that a is an array of two null pointers with type "int []", and `def b=new int[2][][]` means that b is an array of two null pointers with type "int[][]", it seems that they should be equal.
See https://github.com/groovy/groovy-core/blob/master/src/test/groovy/ArrayTest.groovy#L198 2016-10-30 18:50 GMT+08:00 Daniel.Sun <realblue...@hotmail.com>: > Hi Jochen, > > I create JIRA issue > GROOVY-7983(https://issues.apache.org/jira/browse/GROOVY-7983) to track > the > issue. > > BTW, the code in the email should be corrected as follow: > > def a = new int[2][] > def b = new int[2][][] > assert a == b // expect faling > > Cheers, > Daniel.Sun > > > > -- > View this message in context: http://groovy.329449.n5. > nabble.com/An-issue-about-comparing-arrays-tp5736379p5736398.html > Sent from the Groovy Dev mailing list archive at Nabble.com. >