You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Frank Pavageau (JIRA)" <ji...@apache.org> on 2015/12/14 22:37:46 UTC
[jira] [Created] (GROOVY-7710) Random resolution of an overloaded
method with arrays as last parameter called without an argument
Frank Pavageau created GROOVY-7710:
--------------------------------------
Summary: Random resolution of an overloaded method with arrays as last parameter called without an argument
Key: GROOVY-7710
URL: https://issues.apache.org/jira/browse/GROOVY-7710
Project: Groovy
Issue Type: Bug
Components: Static Type Checker
Affects Versions: 2.4.5
Reporter: Frank Pavageau
Assignee: Cédric Champeau
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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)