Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.5
-
None
Description
When calling a method with overloads that have arrays as their last parameter (such as Arrays.sort() or Arrays.hashCode() that have multiple overloads, e.g. with all primitive arrays) but no argument (valid since an array is equivalent to varargs in Groovy), the static type checker resolves to the first (random) method instead of failing because of the ambiguous call.
I have a fix for the bug, but it's based on my pull request for GROOVY-7420 as it's in the same method and I wanted to avoid a painful merge. I'd rather see that fix applied first before creating a new PR, but could extract the same kind of fix based on the current code if necessary, though.